Avoid false positive unused import warnings.
This commit is contained in:
parent
86995dc8c5
commit
32674b3f1a
1 changed files with 6 additions and 5 deletions
|
|
@ -1276,16 +1276,17 @@ impl<'a> Resolver<'a> {
|
|||
self.used_crates.insert(krate);
|
||||
}
|
||||
|
||||
if let NameBindingKind::Import { directive, .. } = binding.kind {
|
||||
self.used_imports.insert((directive.id, ns));
|
||||
self.add_to_glob_map(directive.id, name);
|
||||
}
|
||||
|
||||
if binding.ambiguity().is_some() {
|
||||
self.ambiguity_errors.push((span, name, binding));
|
||||
return true;
|
||||
}
|
||||
|
||||
if let NameBindingKind::Import { directive, binding } = binding.kind {
|
||||
self.used_imports.insert((directive.id, ns));
|
||||
self.add_to_glob_map(directive.id, name);
|
||||
self.record_use(name, ns, binding, span);
|
||||
}
|
||||
|
||||
false
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue