diff options
Diffstat (limited to 'compiler/rustc_expand/src/mbe/macro_rules.rs')
| -rw-r--r-- | compiler/rustc_expand/src/mbe/macro_rules.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_expand/src/mbe/macro_rules.rs b/compiler/rustc_expand/src/mbe/macro_rules.rs index 8903fc45def..3f29d7f7465 100644 --- a/compiler/rustc_expand/src/mbe/macro_rules.rs +++ b/compiler/rustc_expand/src/mbe/macro_rules.rs @@ -1,5 +1,5 @@ -use crate::base::{DummyResult, ExtCtxt, MacResult, TTMacroExpander}; -use crate::base::{SyntaxExtension, SyntaxExtensionKind}; +use crate::base::{DummyResult, SyntaxExtension, SyntaxExtensionKind}; +use crate::base::{ExpandResult, ExtCtxt, MacResult, MacroExpanderResult, TTMacroExpander}; use crate::expand::{ensure_complete_parse, parse_ast_fragment, AstFragment, AstFragmentKind}; use crate::mbe; use crate::mbe::diagnostics::{annotate_doc_comment, parse_failure_msg}; @@ -111,8 +111,8 @@ impl TTMacroExpander for MacroRulesMacroExpander { cx: &'cx mut ExtCtxt<'_>, sp: Span, input: TokenStream, - ) -> Box<dyn MacResult + 'cx> { - expand_macro( + ) -> MacroExpanderResult<'cx> { + ExpandResult::Ready(expand_macro( cx, sp, self.span, @@ -122,7 +122,7 @@ impl TTMacroExpander for MacroRulesMacroExpander { input, &self.lhses, &self.rhses, - ) + )) } } @@ -134,8 +134,8 @@ impl TTMacroExpander for DummyExpander { _: &'cx mut ExtCtxt<'_>, span: Span, _: TokenStream, - ) -> Box<dyn MacResult + 'cx> { - DummyResult::any(span, self.0) + ) -> ExpandResult<Box<dyn MacResult + 'cx>, ()> { + ExpandResult::Ready(DummyResult::any(span, self.0)) } } |
