@@ -294,7 +294,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
294
294
let item = match self . cx . resolver . resolve_macro (
295
295
Mark :: root ( ) , path, MacroKind :: Derive , false ) {
296
296
Ok ( ext) => match * ext {
297
- SyntaxExtension :: BuiltinDerive ( ..) => item_with_markers. clone ( ) ,
297
+ BuiltinDerive ( ..) => item_with_markers. clone ( ) ,
298
298
_ => item. clone ( ) ,
299
299
} ,
300
300
_ => item. clone ( ) ,
@@ -427,7 +427,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
427
427
items. push ( item) ;
428
428
kind. expect_from_annotatables ( items)
429
429
}
430
- SyntaxExtension :: AttrProcMacro ( ref mac) => {
430
+ AttrProcMacro ( ref mac) => {
431
431
let item_tok = TokenTree :: Token ( DUMMY_SP , Token :: interpolated ( match item {
432
432
Annotatable :: Item ( item) => token:: NtItem ( item) ,
433
433
Annotatable :: TraitItem ( item) => token:: NtTraitItem ( item. unwrap ( ) ) ,
@@ -436,7 +436,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
436
436
let tok_result = mac. expand ( self . cx , attr. span , attr. tokens , item_tok) ;
437
437
self . parse_expansion ( tok_result, kind, & attr. path , attr. span )
438
438
}
439
- SyntaxExtension :: ProcMacroDerive ( ..) | SyntaxExtension :: BuiltinDerive ( ..) => {
439
+ ProcMacroDerive ( ..) | BuiltinDerive ( ..) => {
440
440
self . cx . span_err ( attr. span , & format ! ( "`{}` is a derive mode" , attr. path) ) ;
441
441
kind. dummy ( attr. span )
442
442
}
@@ -474,7 +474,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
474
474
} ;
475
475
476
476
let opt_expanded = match * ext {
477
- SyntaxExtension :: DeclMacro ( ref expand, def_span) => {
477
+ DeclMacro ( ref expand, def_span) => {
478
478
if let Err ( msg) = validate_and_set_expn_info ( def_span. map ( |( _, s) | s) ,
479
479
false ) {
480
480
self . cx . span_err ( path. span , & msg) ;
@@ -512,18 +512,18 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
512
512
kind. make_from ( expander. expand ( self . cx , span, ident, input) )
513
513
}
514
514
515
- MultiDecorator ( ..) | MultiModifier ( ..) | SyntaxExtension :: AttrProcMacro ( ..) => {
515
+ MultiDecorator ( ..) | MultiModifier ( ..) | AttrProcMacro ( ..) => {
516
516
self . cx . span_err ( path. span ,
517
517
& format ! ( "`{}` can only be used in attributes" , path) ) ;
518
518
return kind. dummy ( span) ;
519
519
}
520
520
521
- SyntaxExtension :: ProcMacroDerive ( ..) | SyntaxExtension :: BuiltinDerive ( ..) => {
521
+ ProcMacroDerive ( ..) | BuiltinDerive ( ..) => {
522
522
self . cx . span_err ( path. span , & format ! ( "`{}` is a derive mode" , path) ) ;
523
523
return kind. dummy ( span) ;
524
524
}
525
525
526
- SyntaxExtension :: ProcMacro ( ref expandfun) => {
526
+ ProcMacro ( ref expandfun) => {
527
527
if ident. name != keywords:: Invalid . name ( ) {
528
528
let msg =
529
529
format ! ( "macro {}! expects no ident argument, given '{}'" , path, ident) ;
@@ -582,7 +582,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
582
582
} ;
583
583
584
584
match * ext {
585
- SyntaxExtension :: ProcMacroDerive ( ref ext, _) => {
585
+ ProcMacroDerive ( ref ext, _) => {
586
586
invoc. expansion_data . mark . set_expn_info ( expn_info) ;
587
587
let span = Span { ctxt : self . cx . backtrace ( ) , ..span } ;
588
588
let dummy = ast:: MetaItem { // FIXME(jseyfried) avoid this
@@ -592,7 +592,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
592
592
} ;
593
593
kind. expect_from_annotatables ( ext. expand ( self . cx , span, & dummy, item) )
594
594
}
595
- SyntaxExtension :: BuiltinDerive ( func) => {
595
+ BuiltinDerive ( func) => {
596
596
expn_info. callee . allow_internal_unstable = true ;
597
597
invoc. expansion_data . mark . set_expn_info ( expn_info) ;
598
598
let span = Span { ctxt : self . cx . backtrace ( ) , ..span } ;
0 commit comments