Avoid false positive unused_extern_crates
.
This commit is contained in:
parent
04ca378b89
commit
0d30325286
@ -513,6 +513,7 @@ fn import_extern_crate_macros(&mut self,
|
||||
legacy_imports: LegacyMacroImports,
|
||||
allow_shadowing: bool) {
|
||||
let import_macro = |this: &mut Self, name, ext: Rc<_>, span| {
|
||||
this.used_crates.insert(module.def_id().unwrap().krate);
|
||||
if let SyntaxExtension::NormalTT(..) = *ext {
|
||||
this.macro_names.insert(name);
|
||||
}
|
||||
|
@ -26,6 +26,8 @@
|
||||
|
||||
extern crate lint_unused_extern_crate as other; // no error, the use * marks it as used
|
||||
|
||||
#[macro_use] extern crate core; // no error, the `#[macro_use]` marks it as used
|
||||
|
||||
#[allow(unused_imports)]
|
||||
use rand::isaac::IsaacRng;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user