diff options
author | John Hodge <tpg@mutabah.net> | 2017-02-12 12:14:22 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2017-02-12 12:14:22 +0800 |
commit | 69ee1650192dfb687358aa72e55ac023eaad185f (patch) | |
tree | a5a1ef2e18bbbca8c870323fd4a2df0bc2952e42 /src/mir/from_hir_match.cpp | |
parent | bd2d725b2bb013446ad7ed53e384cd1f38073be9 (diff) | |
download | mrust-69ee1650192dfb687358aa72e55ac023eaad185f.tar.gz |
MIR Gen - Alter handling of scopes to support diverging expressions
Diffstat (limited to 'src/mir/from_hir_match.cpp')
-rw-r--r-- | src/mir/from_hir_match.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mir/from_hir_match.cpp b/src/mir/from_hir_match.cpp index 43b60816..a657ffd5 100644 --- a/src/mir/from_hir_match.cpp +++ b/src/mir/from_hir_match.cpp @@ -310,8 +310,8 @@ void MIR_LowerHIR_Match( MirBuilder& builder, MirConverter& conv, ::HIR::ExprNod DEBUG("Arm diverged"); // Nothing need be done, as the block diverged. // - Drops were handled by the diverging block (if not, the below will panic) - { auto _ = mv$(tmp_scope); } - { auto _ = mv$(drop_scope); } + builder.terminate_scope( arm.m_code->span(), mv$(tmp_scope), false ); + builder.terminate_scope( arm.m_code->span(), mv$(drop_scope), false ); builder.end_split_arm( arm.m_code->span(), match_scope, false ); } else { |