@@ -321,6 +321,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
321
321
} else if !old_binding. vis . is_at_least ( binding. vis , this. tcx ) {
322
322
// We are glob-importing the same item but with greater visibility.
323
323
resolution. binding = Some ( binding) ;
324
+ } else if binding. is_ambiguity ( ) {
325
+ resolution. binding = Some ( binding)
324
326
}
325
327
}
326
328
( old_glob @ true , false ) | ( old_glob @ false , true ) => {
@@ -393,7 +395,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
393
395
let t = f ( self , resolution) ;
394
396
395
397
match resolution. binding ( ) {
396
- _ if old_binding. is_some ( ) => return t,
397
398
None => return t,
398
399
Some ( binding) => match old_binding {
399
400
Some ( old_binding) if ptr:: eq ( old_binding, binding) => return t,
@@ -402,7 +403,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
402
403
}
403
404
} ;
404
405
405
- // Define `binding` in `module`s glob importers.
406
+ // Define or update `binding` in `module`s glob importers.
406
407
for import in module. glob_importers . borrow_mut ( ) . iter ( ) {
407
408
let mut ident = key. ident ;
408
409
let scope = match ident. span . reverse_glob_adjust ( module. expansion , import. span ) {
0 commit comments