diff options
author | John Hodge <tpg@mutabah.net> | 2016-11-20 18:26:40 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-11-20 18:26:40 +0800 |
commit | 1a38413f2265a736451a20c222790de08984d200 (patch) | |
tree | 36d47c321fcd08ab616c5424df4af8f33bcc3dc0 | |
parent | 2be13ef87babbf098ac38158eb0151ee43c853c2 (diff) | |
download | mrust-1a38413f2265a736451a20c222790de08984d200.tar.gz |
HIR Expand Reborrow - Reborrow in tuple and array literal
-rw-r--r-- | src/hir_expand/reborrow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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) { |