diff options
Diffstat (limited to 'gcc/rust/hir/rust-ast-lower-stmt.h')
-rw-r--r-- | gcc/rust/hir/rust-ast-lower-stmt.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/rust/hir/rust-ast-lower-stmt.h b/gcc/rust/hir/rust-ast-lower-stmt.h index 484c638..d0a1d38 100644 --- a/gcc/rust/hir/rust-ast-lower-stmt.h +++ b/gcc/rust/hir/rust-ast-lower-stmt.h @@ -47,15 +47,10 @@ public: void visit (AST::MacroInvocation &invoc) override { - if (!invoc.has_semicolon ()) - return; - - AST::ASTFragment &fragment = invoc.get_fragment (); - - // FIXME - // this assertion might go away, maybe on failure's to expand a macro? - rust_assert (!fragment.get_nodes ().empty ()); - fragment.get_nodes ().at (0).accept_vis (*this); + rust_fatal_error ( + invoc.get_locus (), + "macro expansion failed: No macro invocation should get lowered to HIR " + "as they should disappear during expansion"); } void visit (AST::ExprStmtWithBlock &stmt) override |