diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2013-05-01 21:50:09 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2013-05-01 21:50:09 -0400 |
| commit | fbaf8399c8d4670b16684a7d94c8ed70839ffc8e (patch) | |
| tree | 73a518caf62e3eec46ac3d5cdd00cccd1c7056d0 /src | |
| parent | 6210de9529f37bb4ff51050bca19dfd6f28026c9 (diff) | |
| download | rust-fbaf8399c8d4670b16684a7d94c8ed70839ffc8e.tar.gz rust-fbaf8399c8d4670b16684a7d94c8ed70839ffc8e.zip | |
rustc: more fix for trans_lvalue rooted twice
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/middle/trans/expr.rs | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/src/librustc/middle/trans/expr.rs b/src/librustc/middle/trans/expr.rs index a993f781cdb..30c541c0c05 100644 --- a/src/librustc/middle/trans/expr.rs +++ b/src/librustc/middle/trans/expr.rs @@ -823,7 +823,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock { return match expr.node { ast::expr_paren(e) => { - unrooted(bcx, e) + trans_lvalue_unadjusted(bcx, e) } ast::expr_path(_) => { trans_def_lvalue(bcx, expr, bcx.def(expr.id)) @@ -849,12 +849,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock { fn trans_rec_field(bcx: block, base: @ast::expr, field: ast::ident) -> DatumBlock { - /*! - * - * Translates `base.field`. Note that this version always - * yields an unrooted, unmoved version. Rooting and possible - * moves are dealt with above in trans_lvalue_unadjusted(). - */ + //! Translates `base.field`. let mut bcx = bcx; let _icx = bcx.insn_ctxt("trans_rec_field"); @@ -878,12 +873,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock { index_expr: @ast::expr, base: @ast::expr, idx: @ast::expr) -> DatumBlock { - /*! - * - * Translates `base[idx]`. Note that this version always - * yields an unrooted, unmoved version. Rooting and possible - * moves are dealt with above in trans_lvalue_unadjusted(). - */ + //! Translates `base[idx]`. let _icx = bcx.insn_ctxt("trans_index"); let ccx = bcx.ccx(); @@ -946,14 +936,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock { def: ast::def) -> DatumBlock { - /*! - * - * Translates a reference to a path. Note that this version - * generally yields an unrooted, unmoved version. Rooting and - * possible moves are dealt with above in - * trans_lvalue_unadjusted(), with the caveat that local variables - * may already be in move mode. - */ + //! Translates a reference to a path. let _icx = bcx.insn_ctxt("trans_def_lvalue"); let ccx = bcx.ccx(); |
