From 6e2acd529fcfa43368f7ea8209cc5e6b88d2bd79 Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Mon, 18 Jan 2021 16:47:16 +0000 Subject: Support Struct field index initialisation For TupleStructs the constructor can take field indexes to support change or ordering of the fields. --- gcc/rust/backend/rust-compile-struct-field-expr.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/rust/backend/rust-compile-struct-field-expr.h') diff --git a/gcc/rust/backend/rust-compile-struct-field-expr.h b/gcc/rust/backend/rust-compile-struct-field-expr.h index a394f7a..0e54281 100644 --- a/gcc/rust/backend/rust-compile-struct-field-expr.h +++ b/gcc/rust/backend/rust-compile-struct-field-expr.h @@ -38,6 +38,8 @@ public: void visit (HIR::StructExprFieldIdentifierValue &field); + void visit (HIR::StructExprFieldIndexValue &field); + private: CompileStructExprField (Context *ctx) : HIRCompileBase (ctx), translated (nullptr) -- cgit v1.1