summaryrefslogtreecommitdiff
path: root/src/hir_expand/annotate_value_usage.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-11-26 10:51:11 +0800
committerJohn Hodge <tpg@mutabah.net>2016-11-26 10:51:11 +0800
commit3db52a81d3891ff7030d622fd2f364cafa29c278 (patch)
tree159dbe24a4079f3f9f78f7dd0f234ae6bd7df207 /src/hir_expand/annotate_value_usage.cpp
parent5bbb91227cc33fcd593178bebc588d4a389d37bc (diff)
downloadmrust-3db52a81d3891ff7030d622fd2f364cafa29c278.tar.gz
HIR Annotate - Fix annotation on CallValue arguments
Diffstat (limited to 'src/hir_expand/annotate_value_usage.cpp')
-rw-r--r--src/hir_expand/annotate_value_usage.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hir_expand/annotate_value_usage.cpp b/src/hir_expand/annotate_value_usage.cpp
index 08c35492..2634920e 100644
--- a/src/hir_expand/annotate_value_usage.cpp
+++ b/src/hir_expand/annotate_value_usage.cpp
@@ -302,9 +302,12 @@ namespace {
vu = ::HIR::ValueUsage::Move;
break;
}
- auto _ = push_usage( vu );
+ {
+ auto _ = push_usage( vu );
+ this->visit_node_ptr(node.m_value);
+ }
- this->visit_node_ptr(node.m_value);
+ auto _ = push_usage( ::HIR::ValueUsage::Move );
for( auto& val : node.m_args )
this->visit_node_ptr(val);
}