nix syntax::early_buffered_lints

This commit is contained in:
Mazdak Farrokhzad 2020-01-05 10:47:20 +01:00
parent 2b44a6c8f4
commit f361b71a7d
10 changed files with 15 additions and 19 deletions

View File

@ -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",

View File

@ -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};

View File

@ -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" }

View File

@ -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;

View File

@ -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" }

View File

@ -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.

View File

@ -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"

View File

@ -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) {

View File

@ -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;

View File

@ -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.