From ae151d3945e715b7c61ef7b7e5628b915ea320b7 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Sun, 7 Feb 2016 21:47:23 +0200 Subject: [PATCH] [MIR] Fix the destination of implicit else branch --- src/librustc_mir/build/expr/into.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 };