File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,17 @@ declare_clippy_lint! {
7878 /// Checks for `extern crate` and `use` items annotated with
7979 /// lint attributes.
8080 ///
81- /// This lint permits `#[allow(unused_imports)]`, `#[allow(deprecated)]`,
82- /// `#[allow(unreachable_pub)]`, `#[allow(clippy::wildcard_imports)]` and
83- /// `#[allow(clippy::enum_glob_use)]` on `use` items and `#[allow(unused_imports)]` on
84- /// `extern crate` items with a `#[macro_use]` attribute.
81+ /// This lint permits lint attributes for lints emitted on the items themself.
82+ /// For `use` items these lints are:
83+ /// * deprecated
84+ /// * unreachable_pub
85+ /// * unused_imports
86+ /// * clippy::enum_glob_use
87+ /// * clippy::macro_use_imports
88+ /// * clippy::wildcard_imports
89+ ///
90+ /// For `extern crate` items these lints are:
91+ /// * `unused_imports` on items with `#[macro_use]`
8592 ///
8693 /// ### Why is this bad?
8794 /// Lint attributes have no effect on crate imports. Most
@@ -347,7 +354,10 @@ impl<'tcx> LateLintPass<'tcx> for Attributes {
347354 || extract_clippy_lint ( lint) . map_or ( false , |s| {
348355 matches ! (
349356 s. as_str( ) ,
350- "wildcard_imports" | "enum_glob_use" | "redundant_pub_crate" ,
357+ "wildcard_imports"
358+ | "enum_glob_use"
359+ | "redundant_pub_crate"
360+ | "macro_use_imports" ,
351361 )
352362 } )
353363 {
You can’t perform that action at this time.
0 commit comments