@@ -321,6 +321,8 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
321321 } else if !old_binding. vis . is_at_least ( binding. vis , this. tcx ) {
322322 // We are glob-importing the same item but with greater visibility.
323323 resolution. binding = Some ( binding) ;
324+ } else if binding. is_ambiguity ( ) {
325+ resolution. binding = Some ( binding)
324326 }
325327 }
326328 ( old_glob @ true , false ) | ( old_glob @ false , true ) => {
@@ -393,7 +395,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
393395 let t = f ( self , resolution) ;
394396
395397 match resolution. binding ( ) {
396- _ if old_binding. is_some ( ) => return t,
397398 None => return t,
398399 Some ( binding) => match old_binding {
399400 Some ( old_binding) if ptr:: eq ( old_binding, binding) => return t,
@@ -402,7 +403,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
402403 }
403404 } ;
404405
405- // Define `binding` in `module`s glob importers.
406+ // Define or update `binding` in `module`s glob importers.
406407 for import in module. glob_importers . borrow_mut ( ) . iter ( ) {
407408 let mut ident = key. ident ;
408409 let scope = match ident. span . reverse_glob_adjust ( module. expansion , import. span ) {
0 commit comments