summaryrefslogtreecommitdiff
path: root/src/hir/expr.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-12-24 11:44:08 +1100
committerJohn Hodge <tpg@mutabah.net>2016-12-24 11:44:08 +1100
commit07e150e9d7d638977ba3a1561d2687950a2a4668 (patch)
tree153faf4ceff6b1397fb0c76e40ef51dd311578c2 /src/hir/expr.cpp
parent4d8c5a1a0ea1fea86e0e8b4be30ce0c77411f9c2 (diff)
downloadmrust-07e150e9d7d638977ba3a1561d2687950a2a4668.tar.gz
HIR Expand Closures - Handle closures called from other closures
Diffstat (limited to 'src/hir/expr.cpp')
-rw-r--r--src/hir/expr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hir/expr.cpp b/src/hir/expr.cpp
index 51f0661f..7921cf98 100644
--- a/src/hir/expr.cpp
+++ b/src/hir/expr.cpp
@@ -173,6 +173,11 @@ DEF_VISIT(ExprNode_Closure, node,
{
visit_node_ptr(node.m_code);
}
+ else
+ {
+ for(auto& cap : node.m_captures)
+ visit_node_ptr(cap);
+ }
)
#undef DEF_VISIT