diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-02-12 14:57:11 +0000 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-02-13 10:08:03 +0000 |
commit | ca514784717ef9c8418968a60ed4641af78c7d7b (patch) | |
tree | 75434335e1d147047d086441a01323c229bbb601 /gcc/rust/ast/rust-expr.h | |
parent | 3ae8d55860cbe95f80d5e5c76ca71883dbde0e10 (diff) | |
download | gcc-ca514784717ef9c8418968a60ed4641af78c7d7b.zip gcc-ca514784717ef9c8418968a60ed4641af78c7d7b.tar.gz gcc-ca514784717ef9c8418968a60ed4641af78c7d7b.tar.bz2 |
Add ReferenceType with BorrowExpr and DereferenceExpr
This also adds in the mising InferenceType _ which was mostly implemented
before as part of Data Structures 1.
We create GENERIC REFERENCE_TYPES for these this is the building block
to finish work on mutability rules and pointers.
Fixes: #196
Addresses: #169 #170
Diffstat (limited to 'gcc/rust/ast/rust-expr.h')
-rw-r--r-- | gcc/rust/ast/rust-expr.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h index a7e7f1d..0afa46b 100644 --- a/gcc/rust/ast/rust-expr.h +++ b/gcc/rust/ast/rust-expr.h @@ -288,6 +288,10 @@ public: return main_or_left_expr; } + bool get_is_mut () const { return is_mut; } + + bool get_is_double_borrow () const { return double_borrow; } + protected: /* Use covariance to implement clone function as returning this object rather * than base */ |