We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afb2e2c commit e75b098Copy full SHA for e75b098
clippy_lints/src/wildcard_imports.rs
@@ -76,6 +76,8 @@ impl LateLintPass<'_, '_> for WildcardImports {
76
if_chain! {
77
if !in_macro(item.span);
78
if let ItemKind::Use(use_path, UseKind::Glob) = &item.kind;
79
+ // don't lint prelude glob imports
80
+ if !use_path.segments.iter().last().map_or(false, |ps| ps.ident.as_str() == "prelude");
81
let used_imports = cx.tcx.names_imported_by_glob_use(item.hir_id.owner_def_id());
82
if !used_imports.is_empty(); // Already handled by `unused_imports`
83
then {
0 commit comments