Skip to content

Commit fbaf839

Browse files
committed
rustc: more fix for trans_lvalue rooted twice
1 parent 6210de9 commit fbaf839

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

src/librustc/middle/trans/expr.rs

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
823823

824824
return match expr.node {
825825
ast::expr_paren(e) => {
826-
unrooted(bcx, e)
826+
trans_lvalue_unadjusted(bcx, e)
827827
}
828828
ast::expr_path(_) => {
829829
trans_def_lvalue(bcx, expr, bcx.def(expr.id))
@@ -849,12 +849,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
849849
fn trans_rec_field(bcx: block,
850850
base: @ast::expr,
851851
field: ast::ident) -> DatumBlock {
852-
/*!
853-
*
854-
* Translates `base.field`. Note that this version always
855-
* yields an unrooted, unmoved version. Rooting and possible
856-
* moves are dealt with above in trans_lvalue_unadjusted().
857-
*/
852+
//! Translates `base.field`.
858853
859854
let mut bcx = bcx;
860855
let _icx = bcx.insn_ctxt("trans_rec_field");
@@ -878,12 +873,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
878873
index_expr: @ast::expr,
879874
base: @ast::expr,
880875
idx: @ast::expr) -> DatumBlock {
881-
/*!
882-
*
883-
* Translates `base[idx]`. Note that this version always
884-
* yields an unrooted, unmoved version. Rooting and possible
885-
* moves are dealt with above in trans_lvalue_unadjusted().
886-
*/
876+
//! Translates `base[idx]`.
887877
888878
let _icx = bcx.insn_ctxt("trans_index");
889879
let ccx = bcx.ccx();
@@ -946,14 +936,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
946936
def: ast::def)
947937
-> DatumBlock
948938
{
949-
/*!
950-
*
951-
* Translates a reference to a path. Note that this version
952-
* generally yields an unrooted, unmoved version. Rooting and
953-
* possible moves are dealt with above in
954-
* trans_lvalue_unadjusted(), with the caveat that local variables
955-
* may already be in move mode.
956-
*/
939+
//! Translates a reference to a path.
957940
958941
let _icx = bcx.insn_ctxt("trans_def_lvalue");
959942
let ccx = bcx.ccx();

0 commit comments

Comments
 (0)