diff options
Diffstat (limited to 'gcc/rust/expand/rust-macro-expand.cc')
-rw-r--r-- | gcc/rust/expand/rust-macro-expand.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/rust/expand/rust-macro-expand.cc b/gcc/rust/expand/rust-macro-expand.cc index 4d9cade..e86bfcb 100644 --- a/gcc/rust/expand/rust-macro-expand.cc +++ b/gcc/rust/expand/rust-macro-expand.cc @@ -250,7 +250,12 @@ MacroExpander::expand_invoc (AST::MacroInvocation &invoc, } if (invoc.get_kind () == AST::MacroInvocation::InvocKind::Builtin) - expand_eager_invocations (invoc); + { + // Eager expansions are always expressions + push_context (ContextType::EXPR); + expand_eager_invocations (invoc); + pop_context (); + } AST::MacroInvocData &invoc_data = invoc.get_invoc_data (); |