diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mir/from_hir_match.cpp | 2 | ||||
-rw-r--r-- | src/mir/mir_builder.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mir/from_hir_match.cpp b/src/mir/from_hir_match.cpp index f02a7a00..9cc67f9d 100644 --- a/src/mir/from_hir_match.cpp +++ b/src/mir/from_hir_match.cpp @@ -1262,7 +1262,7 @@ int MIR_LowerHIR_Match_Simple__GeneratePattern(MirBuilder& builder, const Span& const auto& rule = rules[rule_idx]; DEBUG("rule = " << rule); - // Don't care. + // Don't emit anything for '_' matches if( rule.is_Any() ) continue ; diff --git a/src/mir/mir_builder.cpp b/src/mir/mir_builder.cpp index c07fdcdc..b0f14a28 100644 --- a/src/mir/mir_builder.cpp +++ b/src/mir/mir_builder.cpp @@ -1072,9 +1072,9 @@ void MirBuilder::moved_lvalue(const Span& sp, const ::MIR::LValue& lv) // 1. If the inner lvalue isn't a slot with move information, move out of the lvalue into a temporary (with standard temp scope) TU_MATCH_DEF( ::MIR::LValue, (*e.val), (ei), ( - //TODO(sp, "Move Box out of indirect access " << *e.val << " and into a temp"); with_val_type(sp, *e.val, [&](const auto& ty){ inner_lv = this->new_temporary(ty); }); this->push_stmt_assign(sp, inner_lv.clone(), ::MIR::RValue( mv$(*e.val) )); + *e.val = inner_lv.clone(); ), (Variable, inner_lv = ::MIR::LValue(ei); |