]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/lint/mod.rs
Lints being from a plugin is dependent on the lint, not the registration
[rust.git] / src / librustc / lint / mod.rs
index b31efc24e52d1fc3d93c9db9cce52ced0bd9c720..455dc06a1efbddb105d14a64656ea8b36fc83ac8 100644 (file)
@@ -39,7 +39,7 @@
 use syntax::source_map::{MultiSpan, ExpnKind, DesugaringKind};
 use syntax::early_buffered_lints::BufferedEarlyLintId;
 use syntax::edition::Edition;
-use syntax::ext::base::MacroKind;
+use syntax_expand::base::MacroKind;
 use syntax::symbol::{Symbol, sym};
 use syntax_pos::Span;
 
@@ -76,6 +76,8 @@ pub struct Lint {
 
     /// `true` if this lint is reported even inside expansions of external macros.
     pub report_in_external_macro: bool,
+
+    pub is_plugin: bool,
 }
 
 impl Lint {
@@ -117,6 +119,7 @@ macro_rules! declare_lint {
             desc: $desc,
             edition_lint_opts: None,
             report_in_external_macro: $external,
+            is_plugin: false,
         };
     );
     ($vis: vis $NAME: ident, $Level: ident, $desc: expr,
@@ -128,6 +131,7 @@ macro_rules! declare_lint {
             desc: $desc,
             edition_lint_opts: Some(($lint_edition, $crate::lint::Level::$edition_level)),
             report_in_external_macro: false,
+            is_plugin: false,
         };
     );
 }
@@ -156,6 +160,7 @@ macro_rules! declare_tool_lint {
             desc: $desc,
             edition_lint_opts: None,
             report_in_external_macro: $external,
+            is_plugin: true,
         };
     );
 }