summaryrefslogtreecommitdiff
path: root/src/mir/from_hir_match.cpp
diff options
context:
space:
mode:
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);