diff options
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h index 6ea97ee..5c3206a 100644 --- a/gcc/rust/backend/rust-compile-expr.h +++ b/gcc/rust/backend/rust-compile-expr.h @@ -211,6 +211,15 @@ public: }); } + void visit (HIR::ArrayElemsCopied &elems) + { + Bexpression *translated_expr + = CompileExpr::Compile (elems.get_elem_to_copy (), ctx); + + for (size_t i = 0; i < elems.get_num_elements (); ++i) + constructor.push_back (translated_expr); + } + void visit (HIR::ArithmeticOrLogicalExpr &expr) { Operator op; |