@@ -33,8 +33,8 @@ use super::diagnostics::{FailedMacro, failed_to_match_macro};
3333use super :: macro_parser:: { NamedMatches , NamedParseResult } ;
3434use super :: { SequenceRepetition , diagnostics} ;
3535use 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 ,
3838} ;
3939use crate :: errors;
4040use crate :: expand:: { AstFragment , AstFragmentKind , ensure_complete_parse, parse_ast_fragment} ;
@@ -267,16 +267,16 @@ impl AttrProcMacro for MacroRulesMacroExpander {
267267 }
268268}
269269
270- struct DummyExpander ( ErrorGuaranteed ) ;
270+ struct DummyBang ( ErrorGuaranteed ) ;
271271
272- impl TTMacroExpander for DummyExpander {
272+ impl BangProcMacro for DummyBang {
273273 fn expand < ' cx > (
274274 & self ,
275275 _: & ' cx mut ExtCtxt < ' _ > ,
276- span : Span ,
276+ _ : Span ,
277277 _: TokenStream ,
278- ) -> ExpandResult < Box < dyn MacResult + ' cx > , ( ) > {
279- ExpandResult :: Ready ( DummyResult :: any ( span , self . 0 ) )
278+ ) -> Result < TokenStream , ErrorGuaranteed > {
279+ Err ( self . 0 )
280280 }
281281}
282282
@@ -664,7 +664,7 @@ pub fn compile_declarative_macro(
664664 SyntaxExtension :: new ( sess, kind, span, Vec :: new ( ) , edition, ident. name , attrs, is_local)
665665 } ;
666666 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 ) ;
668668
669669 let macro_rules = macro_def. macro_rules ;
670670 let exp_sep = if macro_rules { exp ! ( Semi ) } else { exp ! ( Comma ) } ;
0 commit comments