@@ -571,13 +571,13 @@ impl<'a> Resolver<'a> {
571
571
variant : & Variant ,
572
572
parent : Module < ' a > ,
573
573
vis : ty:: Visibility ,
574
- expansion : ExpnId ) {
574
+ expn_id : ExpnId ) {
575
575
let ident = variant. node . ident ;
576
576
577
577
// Define a name in the type namespace.
578
578
let def_id = self . definitions . local_def_id ( variant. node . id ) ;
579
579
let res = Res :: Def ( DefKind :: Variant , def_id) ;
580
- self . define ( parent, ident, TypeNS , ( res, vis, variant. span , expansion ) ) ;
580
+ self . define ( parent, ident, TypeNS , ( res, vis, variant. span , expn_id ) ) ;
581
581
582
582
// If the variant is marked as non_exhaustive then lower the visibility to within the
583
583
// crate.
@@ -596,11 +596,11 @@ impl<'a> Resolver<'a> {
596
596
let ctor_def_id = self . definitions . local_def_id ( ctor_node_id) ;
597
597
let ctor_kind = CtorKind :: from_ast ( & variant. node . data ) ;
598
598
let ctor_res = Res :: Def ( DefKind :: Ctor ( CtorOf :: Variant , ctor_kind) , ctor_def_id) ;
599
- self . define ( parent, ident, ValueNS , ( ctor_res, ctor_vis, variant. span , expansion ) ) ;
599
+ self . define ( parent, ident, ValueNS , ( ctor_res, ctor_vis, variant. span , expn_id ) ) ;
600
600
}
601
601
602
602
/// Constructs the reduced graph for one foreign item.
603
- fn build_reduced_graph_for_foreign_item ( & mut self , item : & ForeignItem , expansion : ExpnId ) {
603
+ fn build_reduced_graph_for_foreign_item ( & mut self , item : & ForeignItem , expn_id : ExpnId ) {
604
604
let ( res, ns) = match item. node {
605
605
ForeignItemKind :: Fn ( ..) => {
606
606
( Res :: Def ( DefKind :: Fn , self . definitions . local_def_id ( item. id ) ) , ValueNS )
@@ -615,16 +615,16 @@ impl<'a> Resolver<'a> {
615
615
} ;
616
616
let parent = self . current_module ;
617
617
let vis = self . resolve_visibility ( & item. vis ) ;
618
- self . define ( parent, item. ident , ns, ( res, vis, item. span , expansion ) ) ;
618
+ self . define ( parent, item. ident , ns, ( res, vis, item. span , expn_id ) ) ;
619
619
}
620
620
621
- fn build_reduced_graph_for_block ( & mut self , block : & Block , expansion : ExpnId ) {
621
+ fn build_reduced_graph_for_block ( & mut self , block : & Block , expn_id : ExpnId ) {
622
622
let parent = self . current_module ;
623
623
if self . block_needs_anonymous_module ( block) {
624
624
let module = self . new_module ( parent,
625
625
ModuleKind :: Block ( block. id ) ,
626
626
parent. normal_ancestor_id ,
627
- expansion ,
627
+ expn_id ,
628
628
block. span ) ;
629
629
self . block_map . insert ( block. id , module) ;
630
630
self . current_module = module; // Descend into the block.
@@ -741,8 +741,8 @@ impl<'a> Resolver<'a> {
741
741
module
742
742
}
743
743
744
- pub fn macro_def_scope ( & mut self , expansion : ExpnId ) -> Module < ' a > {
745
- let def_id = match self . macro_defs . get ( & expansion ) {
744
+ pub fn macro_def_scope ( & mut self , expn_id : ExpnId ) -> Module < ' a > {
745
+ let def_id = match self . macro_defs . get ( & expn_id ) {
746
746
Some ( def_id) => * def_id,
747
747
None => return self . graph_root ,
748
748
} ;
@@ -924,7 +924,7 @@ pub struct BuildReducedGraphVisitor<'a, 'b> {
924
924
925
925
impl < ' a , ' b > BuildReducedGraphVisitor < ' a , ' b > {
926
926
fn visit_invoc ( & mut self , id : ast:: NodeId ) -> & ' b InvocationData < ' b > {
927
- let invoc_id = id. placeholder_to_mark ( ) ;
927
+ let invoc_id = id. placeholder_to_expn_id ( ) ;
928
928
929
929
self . resolver . current_module . unresolved_invocations . borrow_mut ( ) . insert ( invoc_id) ;
930
930
0 commit comments