@@ -9,12 +9,9 @@ use crate::def_collector::collect_definitions;
99use crate :: imports:: { Import , ImportKind } ;
1010use crate :: macros:: { MacroRulesBinding , MacroRulesScope , MacroRulesScopeRef } ;
1111use crate :: Namespace :: { self , MacroNS , TypeNS , ValueNS } ;
12- use crate :: {
13- errors, Determinacy , ExternPreludeEntry , Finalize , Module , ModuleKind , ModuleOrUniformRoot ,
14- } ;
15- use crate :: {
16- MacroData , NameBinding , NameBindingKind , ParentScope , PathResult , PerNS , ResolutionError ,
17- } ;
12+ use crate :: { errors, BindingKey , MacroData } ;
13+ use crate :: { Determinacy , ExternPreludeEntry , Finalize , Module , ModuleKind , ModuleOrUniformRoot } ;
14+ use crate :: { NameBinding , NameBindingKind , ParentScope , PathResult , PerNS , ResolutionError } ;
1815use crate :: { Resolver , ResolverArenas , Segment , ToNameBinding , VisResolutionError } ;
1916
2017use rustc_ast:: visit:: { self , AssocCtxt , Visitor } ;
@@ -72,7 +69,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
7269 T : ToNameBinding < ' a > ,
7370 {
7471 let binding = def. to_name_binding ( self . arenas ) ;
75- let key = self . new_key ( ident, ns) ;
72+ let key = self . new_disambiguated_key ( ident, ns) ;
7673 if let Err ( old_binding) = self . try_define ( parent, key, binding) {
7774 self . report_conflict ( parent, ident, ns, old_binding, & binding) ;
7875 }
@@ -379,7 +376,7 @@ impl<'a, 'b, 'tcx> BuildReducedGraphVisitor<'a, 'b, 'tcx> {
379376 ImportKind :: Single { target, type_ns_only, .. } => {
380377 self . r . per_ns ( |this, ns| {
381378 if !type_ns_only || ns == TypeNS {
382- let key = this . new_key ( target, ns) ;
379+ let key = BindingKey :: new ( target, ns) ;
383380 let mut resolution = this. resolution ( current_module, key) . borrow_mut ( ) ;
384381 resolution. add_single_import ( import) ;
385382 }
0 commit comments