1
Fork 0

Fix redundant import errors for preload extern crate

This commit is contained in:
yukang 2024-03-04 10:24:23 +08:00
parent 62415e2a95
commit 5a4ff2779e
10 changed files with 230 additions and 72 deletions

View file

@ -1336,9 +1336,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
}
let mut is_redundant = true;
let mut redundant_span = PerNS { value_ns: None, type_ns: None, macro_ns: None };
self.per_ns(|this, ns| {
if is_redundant && let Ok(binding) = source_bindings[ns].get() {
if binding.res() == Res::Err {