about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-02-07 20:27:51 +0000
committerbors <bors@rust-lang.org>2016-02-07 20:27:51 +0000
commit73132caa0bb7d9e4eb7531cc729c4323adbdee54 (patch)
treeff5ce993ccb33bf4f3d318406f456fa612aac9dd
parentf50fb159e97eee82b4ff6abaa4003a49d6fe680f (diff)
parentae151d3945e715b7c61ef7b7e5628b915ea320b7 (diff)
Auto merge of #31469 - nagisa:mir-else-dest-fix, r=arielb1
r? @arielb1
-rw-r--r--src/librustc_mir/build/expr/into.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/build/expr/into.rs b/src/librustc_mir/build/expr/into.rs
index f50e5689df0..ca00b99b108 100644
--- a/src/librustc_mir/build/expr/into.rs
+++ b/src/librustc_mir/build/expr/into.rs
@@ -63,7 +63,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
                 } else {
                     // Body of the `if` expression without an `else` clause must return `()`, thus
                     // we implicitly generate a `else {}` if it is not specified.
-                    this.cfg.push_assign_unit(else_block, expr_span, &Lvalue::ReturnPointer);
+                    this.cfg.push_assign_unit(else_block, expr_span, destination);
                     else_block
                 };