This repository was archived by the owner on May 28, 2025. It is now read-only.
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! {
78
78
/// Checks for `extern crate` and `use` items annotated with
79
79
/// lint attributes.
80
80
///
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]`
85
92
///
86
93
/// ### Why is this bad?
87
94
/// Lint attributes have no effect on crate imports. Most
@@ -347,7 +354,10 @@ impl<'tcx> LateLintPass<'tcx> for Attributes {
347
354
|| extract_clippy_lint ( lint) . map_or ( false , |s| {
348
355
matches ! (
349
356
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" ,
351
361
)
352
362
} )
353
363
{
You can’t perform that action at this time.
0 commit comments