diff options
Diffstat (limited to 'gcc/rust/ast/rust-stmt.h')
-rw-r--r-- | gcc/rust/ast/rust-stmt.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-stmt.h b/gcc/rust/ast/rust-stmt.h index 167828c..88be256 100644 --- a/gcc/rust/ast/rust-stmt.h +++ b/gcc/rust/ast/rust-stmt.h @@ -41,7 +41,6 @@ class LetStmt : public Stmt // bool has_outer_attrs; std::vector<Attribute> outer_attrs; -public: std::unique_ptr<Pattern> variables_pattern; // bool has_type; @@ -52,6 +51,7 @@ public: Location locus; +public: Type *inferedType; // Returns whether let statement has outer attributes. @@ -140,6 +140,11 @@ public: return variables_pattern; } + std::unique_ptr<Type> &get_type () { + rust_assert (has_type ()); + return type; + } + protected: /* Use covariance to implement clone function as returning this object rather * than base */ |