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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 2dbaec8..8a1fd6e 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -1345,6 +1345,8 @@ public:
return tuple_elems;
}
+ bool is_unit () const { return tuple_elems.size () == 0; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */