diff options
| author | Graydon Hoare <[email protected]> | 2011-01-21 08:25:13 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-01-21 08:25:13 -0800 |
| commit | 51542b279fcae0f740a76b631ce0fbcdf4c7cf5e (patch) | |
| tree | f20d9b943ff4aebef3a212a3e28571f3472dbe8a | |
| parent | First cut of trans_for. (diff) | |
| download | rust-51542b279fcae0f740a76b631ce0fbcdf4c7cf5e.tar.xz rust-51542b279fcae0f740a76b631ce0fbcdf4c7cf5e.zip | |
Fix bug in trans_for, un-XFAIL linear-for-loop.rs.
| -rw-r--r-- | src/Makefile | 1 | ||||
| -rw-r--r-- | src/comp/middle/trans.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile index 0e039d65..4f27b434 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 \ diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 1a703d0a..57f5b002 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -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()); } |