@@ -22,7 +22,7 @@ use rustc_hir::def::{self, *};
2222use rustc_hir:: def_id:: { CRATE_DEF_ID , DefId , LocalDefId } ;
2323use rustc_index:: bit_set:: DenseBitSet ;
2424use rustc_metadata:: creader:: LoadedMacro ;
25- use rustc_middle:: metadata:: { AmbigModChildKind , ModChild , Reexport } ;
25+ use rustc_middle:: metadata:: { ModChild , Reexport } ;
2626use rustc_middle:: ty:: { Feed , Visibility } ;
2727use rustc_middle:: { bug, span_bug} ;
2828use rustc_span:: hygiene:: { ExpnId , LocalExpnId , MacroKind } ;
@@ -36,9 +36,9 @@ use crate::imports::{ImportData, ImportKind};
3636use crate :: macros:: { MacroRulesBinding , MacroRulesScope , MacroRulesScopeRef } ;
3737use crate :: ref_mut:: CmCell ;
3838use crate :: {
39- AmbiguityKind , BindingKey , ExternPreludeEntry , Finalize , MacroData , Module , ModuleKind ,
40- ModuleOrUniformRoot , NameBinding , NameBindingData , NameBindingKind , ParentScope , PathResult ,
41- ResolutionError , Resolver , Segment , Used , VisResolutionError , errors,
39+ BindingKey , ExternPreludeEntry , Finalize , MacroData , Module , ModuleKind , ModuleOrUniformRoot ,
40+ NameBinding , NameBindingData , NameBindingKind , ParentScope , PathResult , ResolutionError ,
41+ Resolver , Segment , Used , VisResolutionError , errors,
4242} ;
4343
4444type Res = def:: Res < NodeId > ;
@@ -82,7 +82,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
8282 vis : Visibility < DefId > ,
8383 span : Span ,
8484 expansion : LocalExpnId ,
85- ambiguity : Option < ( NameBinding < ' ra > , AmbiguityKind ) > ,
85+ ambiguity : Option < NameBinding < ' ra > > ,
8686 ) {
8787 let binding = self . arenas . alloc_name_binding ( NameBindingData {
8888 kind : NameBindingKind :: Res ( res) ,
@@ -254,7 +254,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
254254 & child. main ,
255255 parent_scope,
256256 children. len ( ) + i,
257- Some ( ( & child. second , child . kind ) ) ,
257+ Some ( & child. second ) ,
258258 )
259259 }
260260 }
@@ -265,7 +265,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
265265 child : & ModChild ,
266266 parent_scope : ParentScope < ' ra > ,
267267 child_index : usize ,
268- ambig_child : Option < ( & ModChild , AmbigModChildKind ) > ,
268+ ambig_child : Option < & ModChild > ,
269269 ) {
270270 let parent = parent_scope. module ;
271271 let child_span = |this : & Self , reexport_chain : & [ Reexport ] , res : def:: Res < _ > | {
@@ -280,15 +280,11 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
280280 let span = child_span ( self , reexport_chain, res) ;
281281 let res = res. expect_non_local ( ) ;
282282 let expansion = parent_scope. expansion ;
283- let ambig = ambig_child. map ( |( ambig_child, ambig_kind ) | {
283+ let ambig = ambig_child. map ( |ambig_child| {
284284 let ModChild { ident : _, res, vis, ref reexport_chain } = * ambig_child;
285285 let span = child_span ( self , reexport_chain, res) ;
286286 let res = res. expect_non_local ( ) ;
287- let ambig_kind = match ambig_kind {
288- AmbigModChildKind :: GlobVsGlob => AmbiguityKind :: GlobVsGlob ,
289- AmbigModChildKind :: GlobVsExpanded => AmbiguityKind :: GlobVsExpanded ,
290- } ;
291- ( self . arenas . new_res_binding ( res, vis, span, expansion) , ambig_kind)
287+ self . arenas . new_res_binding ( res, vis, span, expansion)
292288 } ) ;
293289
294290 // Record primary definitions.
0 commit comments