From 1a38413f2265a736451a20c222790de08984d200 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 20 Nov 2016 18:26:40 +0800 Subject: HIR Expand Reborrow - Reborrow in tuple and array literal --- src/hir_expand/reborrow.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/hir_expand/reborrow.cpp b/src/hir_expand/reborrow.cpp index 680486a2..9eac941c 100644 --- a/src/hir_expand/reborrow.cpp +++ b/src/hir_expand/reborrow.cpp @@ -107,6 +107,18 @@ namespace { } } + void visit(::HIR::ExprNode_ArrayList& node) override { + ::HIR::ExprVisitorDef::visit(node); + for(auto& arg : node.m_vals) { + arg = do_reborrow(mv$(arg)); + } + } + void visit(::HIR::ExprNode_Tuple& node) override { + ::HIR::ExprVisitorDef::visit(node); + for(auto& arg : node.m_vals) { + arg = do_reborrow(mv$(arg)); + } + } void visit(::HIR::ExprNode_TupleVariant& node) override { ::HIR::ExprVisitorDef::visit(node); for(auto& arg : node.m_args) { -- cgit v1.2.3