Skip to content

Commit 73132ca

Browse files
committed
Auto merge of #31469 - nagisa:mir-else-dest-fix, r=arielb1
r? @arielb1
2 parents f50fb15 + ae151d3 commit 73132ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_mir/build/expr/into.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
6363
} else {
6464
// Body of the `if` expression without an `else` clause must return `()`, thus
6565
// we implicitly generate a `else {}` if it is not specified.
66-
this.cfg.push_assign_unit(else_block, expr_span, &Lvalue::ReturnPointer);
66+
this.cfg.push_assign_unit(else_block, expr_span, destination);
6767
else_block
6868
};
6969

0 commit comments

Comments
 (0)