rustc: more fix for trans_lvalue rooted twice
This commit is contained in:
parent
6210de9529
commit
fbaf8399c8
1 changed files with 4 additions and 21 deletions
|
@ -823,7 +823,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
|
||||||
|
|
||||||
return match expr.node {
|
return match expr.node {
|
||||||
ast::expr_paren(e) => {
|
ast::expr_paren(e) => {
|
||||||
unrooted(bcx, e)
|
trans_lvalue_unadjusted(bcx, e)
|
||||||
}
|
}
|
||||||
ast::expr_path(_) => {
|
ast::expr_path(_) => {
|
||||||
trans_def_lvalue(bcx, expr, bcx.def(expr.id))
|
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,
|
fn trans_rec_field(bcx: block,
|
||||||
base: @ast::expr,
|
base: @ast::expr,
|
||||||
field: ast::ident) -> DatumBlock {
|
field: ast::ident) -> DatumBlock {
|
||||||
/*!
|
//! Translates `base.field`.
|
||||||
*
|
|
||||||
* 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().
|
|
||||||
*/
|
|
||||||
|
|
||||||
let mut bcx = bcx;
|
let mut bcx = bcx;
|
||||||
let _icx = bcx.insn_ctxt("trans_rec_field");
|
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,
|
index_expr: @ast::expr,
|
||||||
base: @ast::expr,
|
base: @ast::expr,
|
||||||
idx: @ast::expr) -> DatumBlock {
|
idx: @ast::expr) -> DatumBlock {
|
||||||
/*!
|
//! Translates `base[idx]`.
|
||||||
*
|
|
||||||
* 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().
|
|
||||||
*/
|
|
||||||
|
|
||||||
let _icx = bcx.insn_ctxt("trans_index");
|
let _icx = bcx.insn_ctxt("trans_index");
|
||||||
let ccx = bcx.ccx();
|
let ccx = bcx.ccx();
|
||||||
|
@ -946,14 +936,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
|
||||||
def: ast::def)
|
def: ast::def)
|
||||||
-> DatumBlock
|
-> DatumBlock
|
||||||
{
|
{
|
||||||
/*!
|
//! Translates a reference to a path.
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
let _icx = bcx.insn_ctxt("trans_def_lvalue");
|
let _icx = bcx.insn_ctxt("trans_def_lvalue");
|
||||||
let ccx = bcx.ccx();
|
let ccx = bcx.ccx();
|
||||||
|
|
Loading…
Reference in a new issue