@@ -33,8 +33,8 @@ use super::diagnostics::{FailedMacro, failed_to_match_macro};
33
33
use super :: macro_parser:: { NamedMatches , NamedParseResult } ;
34
34
use super :: { SequenceRepetition , diagnostics} ;
35
35
use crate :: base:: {
36
- AttrProcMacro , DummyResult , ExpandResult , ExtCtxt , MacResult , MacroExpanderResult ,
37
- SyntaxExtension , SyntaxExtensionKind , TTMacroExpander ,
36
+ AttrProcMacro , BangProcMacro , DummyResult , ExpandResult , ExtCtxt , MacResult ,
37
+ MacroExpanderResult , SyntaxExtension , SyntaxExtensionKind , TTMacroExpander ,
38
38
} ;
39
39
use crate :: errors;
40
40
use crate :: expand:: { AstFragment , AstFragmentKind , ensure_complete_parse, parse_ast_fragment} ;
@@ -267,16 +267,16 @@ impl AttrProcMacro for MacroRulesMacroExpander {
267
267
}
268
268
}
269
269
270
- struct DummyExpander ( ErrorGuaranteed ) ;
270
+ struct DummyBang ( ErrorGuaranteed ) ;
271
271
272
- impl TTMacroExpander for DummyExpander {
272
+ impl BangProcMacro for DummyBang {
273
273
fn expand < ' cx > (
274
274
& self ,
275
275
_: & ' cx mut ExtCtxt < ' _ > ,
276
- span : Span ,
276
+ _ : Span ,
277
277
_: TokenStream ,
278
- ) -> ExpandResult < Box < dyn MacResult + ' cx > , ( ) > {
279
- ExpandResult :: Ready ( DummyResult :: any ( span , self . 0 ) )
278
+ ) -> Result < TokenStream , ErrorGuaranteed > {
279
+ Err ( self . 0 )
280
280
}
281
281
}
282
282
@@ -664,7 +664,7 @@ pub fn compile_declarative_macro(
664
664
SyntaxExtension :: new ( sess, kind, span, Vec :: new ( ) , edition, ident. name , attrs, is_local)
665
665
} ;
666
666
let dummy_syn_ext =
667
- |guar| ( mk_syn_ext ( SyntaxExtensionKind :: LegacyBang ( Arc :: new ( DummyExpander ( guar) ) ) ) , 0 ) ;
667
+ |guar| ( mk_syn_ext ( SyntaxExtensionKind :: Bang ( Arc :: new ( DummyBang ( guar) ) ) ) , 0 ) ;
668
668
669
669
let macro_rules = macro_def. macro_rules ;
670
670
let exp_sep = if macro_rules { exp ! ( Semi ) } else { exp ! ( Comma ) } ;
0 commit comments