aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2025-07-22 13:38:26 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2025-08-05 16:36:58 +0200
commitba00ed09766d9698136020418f12e59ccb656af7 (patch)
tree9556fa7b09e5a329cef41908f9c85397460f6f76 /gcc
parent3c18f1e487764251aad411e927bd0857c42ae3cd (diff)
downloadgcc-ba00ed09766d9698136020418f12e59ccb656af7.zip
gcc-ba00ed09766d9698136020418f12e59ccb656af7.tar.gz
gcc-ba00ed09766d9698136020418f12e59ccb656af7.tar.bz2
gccrs: ast: Add Expr::Kind::Try
gcc/rust/ChangeLog: * ast/rust-ast.h: Add the new variant. * ast/rust-expr.h: Use it for TryExpr class.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/ast/rust-ast.h1
-rw-r--r--gcc/rust/ast/rust-expr.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index 0d853e7..33c50b7 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -1318,6 +1318,7 @@ public:
TypeCast,
Assignment,
CompoundAssignment,
+ Try,
};
virtual Kind get_expr_kind () const = 0;
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 8d650b2..4644e8d 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -3792,7 +3792,7 @@ public:
outer_attrs = std::move (new_attrs);
}
- Expr::Kind get_expr_kind () const override { return Expr::Kind::Return; }
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Try; }
protected:
/* Use covariance to implement clone function as returning this object rather