diff options
| author | Graydon Hoare <[email protected]> | 2010-12-02 18:32:43 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-12-02 18:32:43 -0800 |
| commit | f69b4417e6785efed2f4c746da77077d43b03ecf (patch) | |
| tree | 7fbb1f3a33703f850f555ec33e527e7a39105745 | |
| parent | Improve translations of unary box operator and drop_ty on boxes. (diff) | |
| download | rust-f69b4417e6785efed2f4c746da77077d43b03ecf.tar.xz rust-f69b4417e6785efed2f4c746da77077d43b03ecf.zip | |
Don't drop context returned from decl-init call to copy_ty.
| -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 255e0dc6..b05f70d5 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -1510,8 +1510,8 @@ impure fn trans_stmt(@block_ctxt cx, &ast.stmt s) -> result { check (cx.fcx.lllocals.contains_key(local.id)); auto llptr = cx.fcx.lllocals.get(local.id); sub = trans_expr(cx, e); - copy_ty(sub.bcx, true, llptr, sub.val, - typeck.expr_ty(e)); + sub = copy_ty(sub.bcx, true, llptr, sub.val, + typeck.expr_ty(e)); } case (_) { /* fall through */ } } |