diff options
Diffstat (limited to 'gcc/rust/ast/rust-expr.h')
-rw-r--r-- | gcc/rust/ast/rust-expr.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h index d3e7cbd..4971041 100644 --- a/gcc/rust/ast/rust-expr.h +++ b/gcc/rust/ast/rust-expr.h @@ -1000,6 +1000,10 @@ class ArrayExpr : public ExprWithoutBlock Location locus; + // this is a reference to what the inferred type is based on + // this init expression + Type *inferredType; + public: std::string as_string () const override; @@ -1050,6 +1054,9 @@ public: ArrayElems *get_internal_elements () { return internal_elements.get (); }; + Type *get_inferred_type () { return inferredType; } + void set_inferred_type (Type *type) { inferredType = type; } + protected: /* Use covariance to implement clone function as returning this object rather * than base */ |