]> 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 7443cca822a99b40a4037cf9631805b0c71e4d91..455dc06a1efbddb105d14a64656ea8b36fc83ac8 100644 (file)
@@ -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,
         };
     );
 }