Fix bug in trans_for, un-XFAIL linear-for-loop.rs.

This commit is contained in:
Graydon Hoare 2011-01-21 08:25:13 -08:00
parent 6daec4004a
commit 51542b279f
2 changed files with 2 additions and 1 deletions

View File

@ -456,6 +456,7 @@ TEST_XFAILS_RUSTC := $(filter-out \
large-records.rs \
lazy-init.rs \
lazy-and-or.rs \
linear-for-loop.rs \
multiline-comment.rs \
obj-drop.rs \
obj-recursion.rs \

View File

@ -1808,7 +1808,7 @@ fn trans_for(@block_ctxt cx,
cx.build.Br(scope_cx.llbb);
auto local_res = alloc_local(scope_cx, local);
auto bcx = copy_ty(local_res.bcx, true, local_res.val, curr, t).bcx;
trans_block(bcx, body);
bcx = trans_block(bcx, body).bcx;
bcx.build.Br(next_cx.llbb);
ret res(next_cx, C_nil());
}