aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-expr.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast/rust-expr.h')
-rw-r--r--gcc/rust/ast/rust-expr.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 4971041..f587c00 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -3012,11 +3012,11 @@ protected:
// Return expression AST node representation
class ReturnExpr : public ExprWithoutBlock
{
-public:
std::unique_ptr<Expr> return_expr;
Location locus;
+public:
std::string as_string () const override;
/* Returns whether the object has an expression returned (i.e. not void return
@@ -3059,6 +3059,8 @@ public:
void accept_vis (ASTVisitor &vis) override;
+ Expr *get_expr () { return return_expr.get (); }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */