Auto merge of #31469 - nagisa:mir-else-dest-fix, r=arielb1

r? @arielb1
This commit is contained in:
bors 2016-02-07 20:27:51 +00:00
commit 73132caa0b

View file

@ -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
};