summaryrefslogtreecommitdiff
path: root/src/mir/from_hir.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-08-21 17:40:56 +0800
committerJohn Hodge <tpg@mutabah.net>2016-08-21 17:40:56 +0800
commit6a293dffc754462c870f371b69a823b34198e894 (patch)
tree1b90782342d33cf36bc1dfe35f5d70708d90051c /src/mir/from_hir.cpp
parentd28ef52c6424d04662bf4070d263b2bd10e132a0 (diff)
downloadmrust-6a293dffc754462c870f371b69a823b34198e894.tar.gz
MIR Gen - Mark values used in calls as moved
Diffstat (limited to 'src/mir/from_hir.cpp')
-rw-r--r--src/mir/from_hir.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp
index 3a85ebbd..ba8bb7a1 100644
--- a/src/mir/from_hir.cpp
+++ b/src/mir/from_hir.cpp
@@ -1015,9 +1015,10 @@ namespace {
{
this->visit_node_ptr(arg);
values.push_back( m_builder.lvalue_or_temp( arg->m_res_type, m_builder.get_result(arg->span()) ) );
+ m_builder.moved_lvalue( values.back() );
}
- // TODO: Obtain function type for this function
+ // TODO: Obtain function type for this function (i.e. a type that is specifically for this function)
auto fcn_ty_data = ::HIR::FunctionType {
false,
"",
@@ -1063,6 +1064,7 @@ namespace {
{
this->visit_node_ptr(arg);
values.push_back( m_builder.lvalue_or_temp( arg->m_res_type, m_builder.get_result(arg->span()) ) );
+ m_builder.moved_lvalue( values.back() );
}