@@ -319,7 +319,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
319
319
} ;
320
320
321
321
let scope =
322
- if self . monotonic { invoc. expansion_data . mark } else { orig_expansion_data. mark } ;
322
+ if self . monotonic { invoc. expansion_data . id } else { orig_expansion_data. id } ;
323
323
let ext = match self . cx . resolver . resolve_macro_invocation ( & invoc, scope, force) {
324
324
Ok ( ext) => ext,
325
325
Err ( Indeterminate ) => {
@@ -329,9 +329,9 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
329
329
} ;
330
330
331
331
progress = true ;
332
- let ExpansionData { depth, mark , .. } = invoc. expansion_data ;
332
+ let ExpansionData { depth, id : expn_id , .. } = invoc. expansion_data ;
333
333
self . cx . current_expansion = invoc. expansion_data . clone ( ) ;
334
- self . cx . current_expansion . mark = scope;
334
+ self . cx . current_expansion . id = scope;
335
335
336
336
// FIXME(jseyfried): Refactor out the following logic
337
337
let ( expanded_fragment, new_invocations) = if let Some ( ext) = ext {
@@ -362,13 +362,13 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
362
362
item. visit_attrs ( |attrs| attrs. retain ( |a| a. path != sym:: derive) ) ;
363
363
let mut item_with_markers = item. clone ( ) ;
364
364
add_derived_markers ( & mut self . cx , item. span ( ) , & traits, & mut item_with_markers) ;
365
- let derives = derives. entry ( invoc. expansion_data . mark ) . or_default ( ) ;
365
+ let derives = derives. entry ( invoc. expansion_data . id ) . or_default ( ) ;
366
366
367
367
derives. reserve ( traits. len ( ) ) ;
368
368
invocations. reserve ( traits. len ( ) ) ;
369
369
for path in traits {
370
- let mark = ExpnId :: fresh ( self . cx . current_expansion . mark , None ) ;
371
- derives. push ( mark ) ;
370
+ let expn_id = ExpnId :: fresh ( self . cx . current_expansion . id , None ) ;
371
+ derives. push ( expn_id ) ;
372
372
invocations. push ( Invocation {
373
373
kind : InvocationKind :: Derive {
374
374
path,
@@ -377,7 +377,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
377
377
} ,
378
378
fragment_kind : invoc. fragment_kind ,
379
379
expansion_data : ExpansionData {
380
- mark ,
380
+ id : expn_id ,
381
381
..invoc. expansion_data . clone ( )
382
382
} ,
383
383
} ) ;
@@ -392,7 +392,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
392
392
if expanded_fragments. len ( ) < depth {
393
393
expanded_fragments. push ( Vec :: new ( ) ) ;
394
394
}
395
- expanded_fragments[ depth - 1 ] . push ( ( mark , expanded_fragment) ) ;
395
+ expanded_fragments[ depth - 1 ] . push ( ( expn_id , expanded_fragment) ) ;
396
396
if !self . cx . ecfg . single_step {
397
397
invocations. extend ( new_invocations. into_iter ( ) . rev ( ) ) ;
398
398
}
@@ -405,7 +405,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
405
405
while let Some ( expanded_fragments) = expanded_fragments. pop ( ) {
406
406
for ( mark, expanded_fragment) in expanded_fragments. into_iter ( ) . rev ( ) {
407
407
let derives = derives. remove ( & mark) . unwrap_or_else ( Vec :: new) ;
408
- placeholder_expander. add ( NodeId :: placeholder_from_mark ( mark) ,
408
+ placeholder_expander. add ( NodeId :: placeholder_from_expn_id ( mark) ,
409
409
expanded_fragment, derives) ;
410
410
}
411
411
}
@@ -444,7 +444,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
444
444
445
445
if self . monotonic {
446
446
self . cx . resolver . visit_ast_fragment_with_placeholders (
447
- self . cx . current_expansion . mark , & fragment, derives) ;
447
+ self . cx . current_expansion . id , & fragment, derives) ;
448
448
}
449
449
450
450
( fragment, invocations)
@@ -493,7 +493,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
493
493
}
494
494
495
495
if self . cx . current_expansion . depth > self . cx . ecfg . recursion_limit {
496
- let info = self . cx . current_expansion . mark . expn_info ( ) . unwrap ( ) ;
496
+ let info = self . cx . current_expansion . id . expn_info ( ) . unwrap ( ) ;
497
497
let suggested_limit = self . cx . ecfg . recursion_limit * 2 ;
498
498
let mut err = self . cx . struct_span_err ( info. call_site ,
499
499
& format ! ( "recursion limit reached while expanding the macro `{}`" ,
@@ -822,17 +822,17 @@ impl<'a, 'b> InvocationCollector<'a, 'b> {
822
822
) ) ,
823
823
_ => None ,
824
824
} ;
825
- let mark = ExpnId :: fresh ( self . cx . current_expansion . mark , expn_info) ;
825
+ let expn_id = ExpnId :: fresh ( self . cx . current_expansion . id , expn_info) ;
826
826
self . invocations . push ( Invocation {
827
827
kind,
828
828
fragment_kind,
829
829
expansion_data : ExpansionData {
830
- mark ,
830
+ id : expn_id ,
831
831
depth : self . cx . current_expansion . depth + 1 ,
832
832
..self . cx . current_expansion . clone ( )
833
833
} ,
834
834
} ) ;
835
- placeholder ( fragment_kind, NodeId :: placeholder_from_mark ( mark ) )
835
+ placeholder ( fragment_kind, NodeId :: placeholder_from_expn_id ( expn_id ) )
836
836
}
837
837
838
838
fn collect_bang ( & mut self , mac : ast:: Mac , span : Span , kind : AstFragmentKind ) -> AstFragment {
0 commit comments