diff --git a/Cargo.lock b/Cargo.lock index 5b9db979750..b8086c83b8d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3386,6 +3386,7 @@ dependencies = [ "rustc_expand", "rustc_feature", "rustc_parse", + "rustc_session", "rustc_span", "rustc_target", "smallvec 1.0.0", @@ -3544,6 +3545,7 @@ dependencies = [ "rustc_feature", "rustc_lexer", "rustc_parse", + "rustc_session", "rustc_span", "serialize", "smallvec 1.0.0", @@ -3769,6 +3771,7 @@ dependencies = [ "rustc_errors", "rustc_feature", "rustc_lexer", + "rustc_session", "rustc_span", "smallvec 1.0.0", "syntax", diff --git a/src/librustc/lint/mod.rs b/src/librustc/lint/mod.rs index 4f35ef673ef..4afeb144948 100644 --- a/src/librustc/lint/mod.rs +++ b/src/librustc/lint/mod.rs @@ -21,11 +21,11 @@ pub use self::Level::*; pub use self::LintSource::*; -use crate::lint::builtin::HardwiredLints; use crate::ty::TyCtxt; use rustc_data_structures::sync; use rustc_errors::{DiagnosticBuilder, DiagnosticId}; use rustc_hir as hir; +use rustc_session::lint::builtin::HardwiredLints; use rustc_session::{DiagnosticMessageId, Session}; use rustc_span::hygiene::MacroKind; use rustc_span::source_map::{DesugaringKind, ExpnKind, MultiSpan}; diff --git a/src/librustc_builtin_macros/Cargo.toml b/src/librustc_builtin_macros/Cargo.toml index ca57068fb9a..f291eaf9358 100644 --- a/src/librustc_builtin_macros/Cargo.toml +++ b/src/librustc_builtin_macros/Cargo.toml @@ -17,6 +17,7 @@ rustc_errors = { path = "../librustc_errors" } rustc_feature = { path = "../librustc_feature" } rustc_parse = { path = "../librustc_parse" } rustc_target = { path = "../librustc_target" } +rustc_session = { path = "../librustc_session" } smallvec = { version = "1.0", features = ["union", "may_dangle"] } syntax = { path = "../libsyntax" } rustc_expand = { path = "../librustc_expand" } diff --git a/src/librustc_builtin_macros/source_util.rs b/src/librustc_builtin_macros/source_util.rs index 19a766de1f4..dc85a92d272 100644 --- a/src/librustc_builtin_macros/source_util.rs +++ b/src/librustc_builtin_macros/source_util.rs @@ -1,15 +1,15 @@ use rustc_expand::base::{self, *}; use rustc_expand::panictry; use rustc_parse::{self, new_sub_parser_from_file, parser::Parser, DirectoryOwnership}; +use rustc_session::lint::builtin::INCOMPLETE_INCLUDE; use rustc_span::symbol::Symbol; +use rustc_span::{self, Pos, Span}; use syntax::ast; -use syntax::early_buffered_lints::INCOMPLETE_INCLUDE; use syntax::print::pprust; use syntax::ptr::P; use syntax::token; use syntax::tokenstream::TokenStream; -use rustc_span::{self, Pos, Span}; use smallvec::SmallVec; use rustc_data_structures::sync::Lrc; diff --git a/src/librustc_expand/Cargo.toml b/src/librustc_expand/Cargo.toml index c23846063c1..2aa1f93378a 100644 --- a/src/librustc_expand/Cargo.toml +++ b/src/librustc_expand/Cargo.toml @@ -19,5 +19,6 @@ rustc_errors = { path = "../librustc_errors" } rustc_feature = { path = "../librustc_feature" } rustc_lexer = { path = "../librustc_lexer" } rustc_parse = { path = "../librustc_parse" } +rustc_session = { path = "../librustc_session" } smallvec = { version = "1.0", features = ["union", "may_dangle"] } syntax = { path = "../libsyntax" } diff --git a/src/librustc_expand/mbe/macro_check.rs b/src/librustc_expand/mbe/macro_check.rs index 992764ab6a4..47865b2fb9f 100644 --- a/src/librustc_expand/mbe/macro_check.rs +++ b/src/librustc_expand/mbe/macro_check.rs @@ -106,14 +106,14 @@ //! bound. use crate::mbe::{KleeneToken, TokenTree}; +use rustc_data_structures::fx::FxHashMap; +use rustc_session::lint::builtin::META_VARIABLE_MISUSE; +use rustc_session::parse::ParseSess; use rustc_span::symbol::{kw, sym}; +use rustc_span::{symbol::Ident, MultiSpan, Span}; use syntax::ast::NodeId; -use syntax::early_buffered_lints::META_VARIABLE_MISUSE; -use syntax::sess::ParseSess; use syntax::token::{DelimToken, Token, TokenKind}; -use rustc_data_structures::fx::FxHashMap; -use rustc_span::{symbol::Ident, MultiSpan, Span}; use smallvec::SmallVec; /// Stack represented as linked list. diff --git a/src/librustc_parse/Cargo.toml b/src/librustc_parse/Cargo.toml index d41d89902ef..aa159c55ff2 100644 --- a/src/librustc_parse/Cargo.toml +++ b/src/librustc_parse/Cargo.toml @@ -18,6 +18,7 @@ rustc_lexer = { path = "../librustc_lexer" } rustc_errors = { path = "../librustc_errors" } rustc_error_codes = { path = "../librustc_error_codes" } smallvec = { version = "1.0", features = ["union", "may_dangle"] } +rustc_session = { path = "../librustc_session" } rustc_span = { path = "../librustc_span" } syntax = { path = "../libsyntax" } unicode-normalization = "0.1.11" diff --git a/src/librustc_parse/validate_attr.rs b/src/librustc_parse/validate_attr.rs index f0893612207..84562fbb46f 100644 --- a/src/librustc_parse/validate_attr.rs +++ b/src/librustc_parse/validate_attr.rs @@ -4,10 +4,10 @@ use crate::parse_in; use rustc_errors::{Applicability, PResult}; use rustc_feature::{AttributeTemplate, BUILTIN_ATTRIBUTE_MAP}; +use rustc_session::lint::builtin::ILL_FORMED_ATTRIBUTE_INPUT; +use rustc_session::parse::ParseSess; use rustc_span::{sym, Symbol}; use syntax::ast::{self, Attribute, MacArgs, MacDelimiter, MetaItem, MetaItemKind}; -use syntax::early_buffered_lints::ILL_FORMED_ATTRIBUTE_INPUT; -use syntax::sess::ParseSess; use syntax::tokenstream::DelimSpan; pub fn check_meta(sess: &ParseSess, attr: &Attribute) { diff --git a/src/libsyntax/early_buffered_lints.rs b/src/libsyntax/early_buffered_lints.rs deleted file mode 100644 index 8df4eb6c9ac..00000000000 --- a/src/libsyntax/early_buffered_lints.rs +++ /dev/null @@ -1,8 +0,0 @@ -//! Allows the buffering of lints for later. -//! -//! Since we cannot have a dependency on `librustc`, we implement some types here that are somewhat -//! redundant. Later, these types can be converted to types for use by the rest of the compiler. - -pub use rustc_session::lint::builtin::ILL_FORMED_ATTRIBUTE_INPUT; -pub use rustc_session::lint::builtin::{INCOMPLETE_INCLUDE, META_VARIABLE_MISUSE}; -pub use rustc_session::lint::BufferedEarlyLint; diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index c03e848b7a4..75c647f2daa 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -93,8 +93,6 @@ pub mod print { pub mod pprust; } -pub mod early_buffered_lints; - use rustc_data_structures::stable_hasher::{HashStable, StableHasher}; /// Requirements for a `StableHashingContext` to be used in this crate.