aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-expr.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-01-18 17:57:22 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-01-20 09:59:22 +0000
commit12f7bd0fc4e9ab4e98869b5265aea6bacfb31d03 (patch)
treeaaff0986f81394b83e8536b68a18bcd48ecb9484 /gcc/rust/ast/rust-expr.h
parent6e2acd529fcfa43368f7ea8209cc5e6b88d2bd79 (diff)
downloadgcc-12f7bd0fc4e9ab4e98869b5265aea6bacfb31d03.zip
gcc-12f7bd0fc4e9ab4e98869b5265aea6bacfb31d03.tar.gz
gcc-12f7bd0fc4e9ab4e98869b5265aea6bacfb31d03.tar.bz2
Support struct initializers using Identifiers
This resolves each identifier for its respective field. It includes fixes for the TypeResolver to print errors instead of asserts where we loose decent debug info.
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 8a1fd6e..6dba7fd 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -1604,6 +1604,8 @@ public:
void accept_vis (ASTVisitor &vis) override;
+ Identifier get_field_name () const { return field_name; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */