File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,26 @@ macro_rules! declare_lint {
139
139
) ;
140
140
}
141
141
142
+ #[ macro_export]
143
+ macro_rules! declare_tool_lint {
144
+ ( $vis: vis $tool: ident :: $NAME: ident, $Level: ident, $desc: expr) => (
145
+ declare_tool_lint!{ $vis $tool:: $NAME, $Level, $desc, false }
146
+ ) ;
147
+ ( $vis: vis $tool: ident :: $NAME: ident, $Level: ident, $desc: expr,
148
+ report_in_external_macro: $rep: expr) => (
149
+ declare_tool_lint!{ $vis $tool:: $NAME, $Level, $desc, $rep}
150
+ ) ;
151
+ ( $vis: vis $tool: ident :: $NAME: ident, $Level: ident, $desc: expr, $external: expr) => (
152
+ $vis static $NAME: & $crate:: lint:: Lint = & $crate:: lint:: Lint {
153
+ name: & concat!( stringify!( $tool) , "::" , stringify!( $NAME) ) ,
154
+ default_level: $crate:: lint:: $Level,
155
+ desc: $desc,
156
+ edition_lint_opts: None ,
157
+ report_in_external_macro: $external,
158
+ } ;
159
+ ) ;
160
+ }
161
+
142
162
/// Declare a static `LintArray` and return it as an expression.
143
163
#[ macro_export]
144
164
macro_rules! lint_array {
You can’t perform that action at this time.
0 commit comments