@@ -350,8 +350,8 @@ pub fn compile_declarative_macro(
350
350
let tt_spec = ast:: Ident :: new ( sym:: tt, def. span ) ;
351
351
352
352
// Parse the macro_rules! invocation
353
- let ( is_legacy , body) = match & def. kind {
354
- ast:: ItemKind :: MacroDef ( macro_def ) => ( macro_def . legacy , macro_def . body . inner_tokens ( ) ) ,
353
+ let ( macro_rules , body) = match & def. kind {
354
+ ast:: ItemKind :: MacroDef ( def ) => ( def . macro_rules , def . body . inner_tokens ( ) ) ,
355
355
_ => unreachable ! ( ) ,
356
356
} ;
357
357
@@ -370,7 +370,7 @@ pub fn compile_declarative_macro(
370
370
mbe:: TokenTree :: MetaVarDecl ( def. span, rhs_nm, tt_spec) ,
371
371
] ,
372
372
separator: Some ( Token :: new(
373
- if is_legacy { token:: Semi } else { token:: Comma } ,
373
+ if macro_rules { token:: Semi } else { token:: Comma } ,
374
374
def. span,
375
375
) ) ,
376
376
kleene: mbe:: KleeneToken :: new( mbe:: KleeneOp :: OneOrMore , def. span) ,
@@ -382,7 +382,7 @@ pub fn compile_declarative_macro(
382
382
DelimSpan :: dummy( ) ,
383
383
Lrc :: new( mbe:: SequenceRepetition {
384
384
tts: vec![ mbe:: TokenTree :: token(
385
- if is_legacy { token:: Semi } else { token:: Comma } ,
385
+ if macro_rules { token:: Semi } else { token:: Comma } ,
386
386
def. span,
387
387
) ] ,
388
388
separator: None ,
@@ -456,7 +456,7 @@ pub fn compile_declarative_macro(
456
456
// that is not lint-checked and trigger the "failed to process buffered lint here" bug.
457
457
valid &= macro_check:: check_meta_variables ( sess, ast:: CRATE_NODE_ID , def. span , & lhses, & rhses) ;
458
458
459
- let ( transparency, transparency_error) = attr:: find_transparency ( & def. attrs , is_legacy ) ;
459
+ let ( transparency, transparency_error) = attr:: find_transparency ( & def. attrs , macro_rules ) ;
460
460
match transparency_error {
461
461
Some ( TransparencyError :: UnknownTransparency ( value, span) ) => {
462
462
diag. span_err ( span, & format ! ( "unknown macro transparency: `{}`" , value) )
0 commit comments