Skip to content

Commit 1181943

Browse files
committed
Invoke put functions
Issue #236
1 parent 5b7145a commit 1181943

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/comp/middle/trans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4343,7 +4343,7 @@ fn trans_put(in_cx: &@block_ctxt, e: &option::t<@ast::expr>) -> result {
43434343
llargs += [r.val];
43444344
}
43454345
}
4346-
FastCall(bcx, llcallee, llargs);
4346+
bcx = invoke_fastcall(bcx, llcallee, llargs).bcx;
43474347
bcx = trans_block_cleanups(bcx, cx);
43484348
let next_cx = new_sub_block_ctxt(in_cx, "next");
43494349
Br(bcx, next_cx.llbb);

src/test/run-fail/unwind-iter2.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// error-pattern:fail
2+
3+
iter x() -> int {
4+
let a = @0;
5+
put 1;
6+
}
7+
8+
fn main() {
9+
for each x in x() {
10+
fail;
11+
}
12+
}

0 commit comments

Comments
 (0)