diff options
Diffstat (limited to 'gcc/rust/expand')
-rw-r--r-- | gcc/rust/expand/rust-attribute-visitor.cc | 2 | ||||
-rw-r--r-- | gcc/rust/expand/rust-macro-expand.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/gcc/rust/expand/rust-attribute-visitor.cc b/gcc/rust/expand/rust-attribute-visitor.cc index 771f034..c7c6867 100644 --- a/gcc/rust/expand/rust-attribute-visitor.cc +++ b/gcc/rust/expand/rust-attribute-visitor.cc @@ -1193,7 +1193,6 @@ AttrVisitor::visit (AST::BlockExpr &expr) if (expander.fails_cfg_with_expand (expr.get_outer_attrs ())) { expr.mark_for_strip (); - expander.pop_context (); return; } @@ -1203,7 +1202,6 @@ AttrVisitor::visit (AST::BlockExpr &expr) if (expander.fails_cfg_with_expand (expr.get_inner_attrs ())) { expr.mark_for_strip (); - expander.pop_context (); return; } diff --git a/gcc/rust/expand/rust-macro-expand.h b/gcc/rust/expand/rust-macro-expand.h index 3c53d8d..a582524 100644 --- a/gcc/rust/expand/rust-macro-expand.h +++ b/gcc/rust/expand/rust-macro-expand.h @@ -275,8 +275,11 @@ struct MacroExpander ContextType pop_context () { + rust_assert (!context.empty ()); + ContextType t = context.back (); context.pop_back (); + return t; } |