diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 4d535c48eb1..2c9cbb6d0dc 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -4343,7 +4343,7 @@ fn trans_put(in_cx: &@block_ctxt, e: &option::t<@ast::expr>) -> result { llargs += [r.val]; } } - FastCall(bcx, llcallee, llargs); + bcx = invoke_fastcall(bcx, llcallee, llargs).bcx; bcx = trans_block_cleanups(bcx, cx); let next_cx = new_sub_block_ctxt(in_cx, "next"); Br(bcx, next_cx.llbb); diff --git a/src/test/run-fail/unwind-iter2.rs b/src/test/run-fail/unwind-iter2.rs new file mode 100644 index 00000000000..a924bb13616 --- /dev/null +++ b/src/test/run-fail/unwind-iter2.rs @@ -0,0 +1,12 @@ +// error-pattern:fail + +iter x() -> int { + let a = @0; + put 1; +} + +fn main() { + for each x in x() { + fail; + } +} \ No newline at end of file