summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-11-20 18:26:40 +0800
committerJohn Hodge <tpg@mutabah.net>2016-11-20 18:26:40 +0800
commit1a38413f2265a736451a20c222790de08984d200 (patch)
tree36d47c321fcd08ab616c5424df4af8f33bcc3dc0
parent2be13ef87babbf098ac38158eb0151ee43c853c2 (diff)
downloadmrust-1a38413f2265a736451a20c222790de08984d200.tar.gz
HIR Expand Reborrow - Reborrow in tuple and array literal
-rw-r--r--src/hir_expand/reborrow.cpp12
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) {