summaryrefslogtreecommitdiff
path: root/src/mir/from_hir_match.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-11-05 10:52:33 +0800
committerJohn Hodge <tpg@mutabah.net>2016-11-05 10:52:33 +0800
commit6072655369db89d8c8ec0f79ef03f04f695f7459 (patch)
treed69db4dcfba3cca0064d689645e1dad06fe65063 /src/mir/from_hir_match.cpp
parentd45ed7dacfb36edc80127ff90b1bdc0ca2279a2a (diff)
downloadmrust-6072655369db89d8c8ec0f79ef03f04f695f7459.tar.gz
MIR Gen - Drop InnerMoved early for cleaner logic
Diffstat (limited to 'src/mir/from_hir_match.cpp')
-rw-r--r--src/mir/from_hir_match.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mir/from_hir_match.cpp b/src/mir/from_hir_match.cpp
index 6ad2cd95..5cf5ff1e 100644
--- a/src/mir/from_hir_match.cpp
+++ b/src/mir/from_hir_match.cpp
@@ -178,10 +178,10 @@ void MIR_LowerHIR_Match( MirBuilder& builder, MirConverter& conv, ::HIR::ExprNod
builder.push_stmt_assign( arm.m_code->span(), result_val.clone(), builder.get_result(arm.m_code->span()) );
// - Drop all non-moved values from this scope
builder.terminate_scope( arm.m_code->span(), mv$(drop_scope) );
+ // - Split end match scope
+ builder.end_split_arm( arm.m_code->span(), match_scope, true );
// - Go to the next block
builder.end_block( ::MIR::Terminator::make_Goto(next_block) );
-
- builder.end_split_arm( arm.m_code->span(), match_scope, true );
}
arm_code.push_back( mv$(ac) );