@@ -9,12 +9,9 @@ use crate::def_collector::collect_definitions;
9
9
use crate :: imports:: { Import , ImportKind } ;
10
10
use crate :: macros:: { MacroRulesBinding , MacroRulesScope , MacroRulesScopeRef } ;
11
11
use 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 } ;
18
15
use crate :: { Resolver , ResolverArenas , Segment , ToNameBinding , VisResolutionError } ;
19
16
20
17
use rustc_ast:: visit:: { self , AssocCtxt , Visitor } ;
@@ -72,7 +69,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
72
69
T : ToNameBinding < ' a > ,
73
70
{
74
71
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) ;
76
73
if let Err ( old_binding) = self . try_define ( parent, key, binding) {
77
74
self . report_conflict ( parent, ident, ns, old_binding, & binding) ;
78
75
}
@@ -379,7 +376,7 @@ impl<'a, 'b, 'tcx> BuildReducedGraphVisitor<'a, 'b, 'tcx> {
379
376
ImportKind :: Single { target, type_ns_only, .. } => {
380
377
self . r . per_ns ( |this, ns| {
381
378
if !type_ns_only || ns == TypeNS {
382
- let key = this . new_key ( target, ns) ;
379
+ let key = BindingKey :: new ( target, ns) ;
383
380
let mut resolution = this. resolution ( current_module, key) . borrow_mut ( ) ;
384
381
resolution. add_single_import ( import) ;
385
382
}
0 commit comments