Skip to content

Commit 3c23b46

Browse files
catch both Pending and Ready(None)
1 parent cba97a9 commit 3c23b46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/rustc_resolve/src/imports.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,11 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
490490
// or indeterminate resolution, also mark such failed imports as used to avoid duplicate diagnostics.
491491
fn import_dummy_binding(&mut self, import: Import<'ra>, is_indeterminate: bool) {
492492
if let ImportKind::Single { target, ref bindings, .. } = import.kind {
493-
if !(is_indeterminate || bindings.iter().all(|binding| binding.get().is_pending())) {
493+
if !(is_indeterminate
494+
|| bindings.iter().all(|binding| {
495+
matches!(binding.get(), Progress::Pending | Progress::Ready(None))
496+
}))
497+
{
494498
return; // Has resolution, do not create the dummy binding
495499
}
496500
let dummy_binding = self.dummy_binding;

0 commit comments

Comments
 (0)