summaryrefslogtreecommitdiff
path: root/src/mir/from_hir_match.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/mir/from_hir_match.cpp
parent4d8c5a1a0ea1fea86e0e8b4be30ce0c77411f9c2 (diff)
downloadmrust-07e150e9d7d638977ba3a1561d2687950a2a4668.tar.gz
HIR Expand Closures - Handle closures called from other closures
Diffstat (limited to 'src/mir/from_hir_match.cpp')
-rw-r--r--src/mir/from_hir_match.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mir/from_hir_match.cpp b/src/mir/from_hir_match.cpp
index 31704dc4..f191f3fa 100644
--- a/src/mir/from_hir_match.cpp
+++ b/src/mir/from_hir_match.cpp
@@ -275,6 +275,8 @@ void MIR_LowerHIR_Match( MirBuilder& builder, MirConverter& conv, ::HIR::ExprNod
// NOTE: Paused block resumed upon successful match
}
+ // TODO: If this pattern ignores fields with Drop impls, this will lead to leaks.
+ // - Ideally, this would trigger a drop of whatever wasn't already taken by the pattern.
if( has_move_pattern )
{
builder.moved_lvalue(node.span(), match_val);