diff options
| author | Brian Anderson <[email protected]> | 2011-03-24 21:04:29 -0400 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-25 11:01:52 -0700 |
| commit | 71f058499a0e551d2b8deb5d098bdb04387dc021 (patch) | |
| tree | 4e14a52c8c0092f332c3c9477b85b97799310244 /src/comp/middle/trans.rs | |
| parent | Add test for local declarations with receive. XFAIL in rustc. (diff) | |
| download | rust-71f058499a0e551d2b8deb5d098bdb04387dc021.tar.xz rust-71f058499a0e551d2b8deb5d098bdb04387dc021.zip | |
Refactor ast.local to make room for initialization via recv
Diffstat (limited to 'src/comp/middle/trans.rs')
| -rw-r--r-- | src/comp/middle/trans.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index a65bb284..5c7c8ff7 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -4869,8 +4869,8 @@ fn init_local(@block_ctxt cx, @ast.local local) -> result { vec(clean(bind drop_slot(_, llptr, ty))); alt (local.init) { - case (some[@ast.expr](?e)) { - auto sub = trans_expr(bcx, e); + case (some[ast.initializer](?init)) { + auto sub = trans_expr(bcx, init.expr); bcx = copy_ty(sub.bcx, INIT, llptr, sub.val, ty).bcx; } case (_) { |