mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-10 23:06:23 +00:00
Do not try to save block result when the block is an iter body
Closes #791
This commit is contained in:
parent
6c9b90d06a
commit
78a0d380cc
@ -6534,7 +6534,8 @@ fn trans_closure(bcx_maybe: &option::t[@block_ctxt],
|
||||
// (trans_block, trans_expr, et cetera).
|
||||
let rslt =
|
||||
if !ty::type_is_nil(cx.ccx.tcx, block_ty) &&
|
||||
!ty::type_is_bot(cx.ccx.tcx, block_ty) {
|
||||
!ty::type_is_bot(cx.ccx.tcx, block_ty) &&
|
||||
f.proto != ast::proto_iter {
|
||||
trans_block(bcx, f.body, save_in(fcx.llretptr))
|
||||
} else { trans_block(bcx, f.body, return) };
|
||||
bcx = rslt.bcx;
|
||||
|
Loading…
Reference in New Issue
Block a user