Skip to content

Commit 51542b2

Browse files
committed
Fix bug in trans_for, un-XFAIL linear-for-loop.rs.
1 parent 6daec40 commit 51542b2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ TEST_XFAILS_RUSTC := $(filter-out \
456456
large-records.rs \
457457
lazy-init.rs \
458458
lazy-and-or.rs \
459+
linear-for-loop.rs \
459460
multiline-comment.rs \
460461
obj-drop.rs \
461462
obj-recursion.rs \

src/comp/middle/trans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@ fn trans_for(@block_ctxt cx,
18081808
cx.build.Br(scope_cx.llbb);
18091809
auto local_res = alloc_local(scope_cx, local);
18101810
auto bcx = copy_ty(local_res.bcx, true, local_res.val, curr, t).bcx;
1811-
trans_block(bcx, body);
1811+
bcx = trans_block(bcx, body).bcx;
18121812
bcx.build.Br(next_cx.llbb);
18131813
ret res(next_cx, C_nil());
18141814
}

0 commit comments

Comments
 (0)