summaryrefslogtreecommitdiff
path: root/src/hir_expand/annotate_value_usage.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-11-19 22:46:14 +0800
committerJohn Hodge <tpg@mutabah.net>2016-11-19 22:46:14 +0800
commitcf499efccf021db06630b76224bcb68dcf923975 (patch)
treef64e891cb31ed6f886a83b110b94fed718cb9011 /src/hir_expand/annotate_value_usage.cpp
parent5fe7fcc580db497b267ca0f820e5d3268fe8aafb (diff)
downloadmrust-cf499efccf021db06630b76224bcb68dcf923975.tar.gz
HIR - Union handling
Diffstat (limited to 'src/hir_expand/annotate_value_usage.cpp')
-rw-r--r--src/hir_expand/annotate_value_usage.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hir_expand/annotate_value_usage.cpp b/src/hir_expand/annotate_value_usage.cpp
index 7f2462d9..5ddfd39b 100644
--- a/src/hir_expand/annotate_value_usage.cpp
+++ b/src/hir_expand/annotate_value_usage.cpp
@@ -355,6 +355,11 @@ namespace {
this->visit_node_ptr(fld_val.second);
}
}
+ void visit(::HIR::ExprNode_UnionLiteral& node) override
+ {
+ auto _ = push_usage( ::HIR::ValueUsage::Move );
+ this->visit_node_ptr(node.m_value);
+ }
void visit(::HIR::ExprNode_Tuple& node) override
{
auto _ = push_usage( ::HIR::ValueUsage::Move );