aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast')
-rw-r--r--gcc/rust/ast/rust-ast.h3
-rw-r--r--gcc/rust/ast/rust-macro.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index 5817a0e..785af81 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -1871,13 +1871,12 @@ public:
return *this;
}
- static ASTFragment create_empty () { return ASTFragment ({}); }
static ASTFragment create_error () { return ASTFragment ({}, true); }
std::vector<SingleASTNode> &get_nodes () { return nodes; }
bool is_error () const { return fragment_is_error; }
- bool should_expand () const { return !is_error () && !nodes.empty (); }
+ bool should_expand () const { return !is_error (); }
std::unique_ptr<Expr> take_expression_fragment ()
{
diff --git a/gcc/rust/ast/rust-macro.h b/gcc/rust/ast/rust-macro.h
index 1d92283..5ab82c4 100644
--- a/gcc/rust/ast/rust-macro.h
+++ b/gcc/rust/ast/rust-macro.h
@@ -469,7 +469,7 @@ class MacroRulesDefinition : public MacroItem
static ASTFragment dummy_builtin (Location, MacroInvocData &)
{
gcc_unreachable ();
- return ASTFragment::create_empty ();
+ return ASTFragment::create_error ();
}
/* NOTE: in rustc, macro definitions are considered (and parsed as) a type