Skip to content

Commit efa4ab5

Browse files
committed
Fix useless_attribute to also whitelist unused_extern_crates.
1 parent 1bc4d5b commit efa4ab5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

clippy_lints/src/attrs.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,15 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for AttrPass {
180180
|| is_word(lint, "deprecated") {
181181
return
182182
},
183-
ItemKind::ExternCrate(..) => if is_word(lint, "unused_imports")
184-
&& skip_unused_imports {
183+
ItemKind::ExternCrate(..) => {
184+
if is_word(lint, "unused_imports")
185+
&& skip_unused_imports {
186+
return
187+
}
188+
if is_word(lint, "unused_extern_crates") {
185189
return
186-
},
190+
}
191+
}
187192
_ => {},
188193
}
189194
}

0 commit comments

Comments
 (0)