summaryrefslogtreecommitdiff
path: root/src/hir_expand
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-10-05 15:13:10 +0800
committerJohn Hodge <tpg@mutabah.net>2016-10-05 15:13:10 +0800
commitf92cd2ce1389b491116935eedae83a1a4aa19d8a (patch)
tree3bb5dbf092ca8594837f02e4ddab5c4759fe82f8 /src/hir_expand
parent185de39f5190962bd67cdc7f9fafc9dac3c66ddd (diff)
downloadmrust-f92cd2ce1389b491116935eedae83a1a4aa19d8a.tar.gz
HIR Expand Closures - Propagate value usage for replaced variables
Diffstat (limited to 'src/hir_expand')
-rw-r--r--src/hir_expand/closures.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hir_expand/closures.cpp b/src/hir_expand/closures.cpp
index fb30efe6..6530c3d2 100644
--- a/src/hir_expand/closures.cpp
+++ b/src/hir_expand/closures.cpp
@@ -129,6 +129,7 @@ namespace {
get_self(node.span()),
FMT(binding_it - m_captures.begin())
);
+ m_replacement->m_usage = node.m_usage;
return ;
}