Function rustc_trans::trans::expr::trans_to_lvalueExperimental [-]  [+] [src]

pub fn trans_to_lvalue<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, expr: &Expr, name: &str) -> DatumBlock<'blk, 'tcx, Lvalue>

Translates an expression in "lvalue" mode -- meaning that it returns a reference to the memory that the expr represents.

If this expression is an rvalue, this implies introducing a temporary. In other words, something like x().f is translated into roughly the equivalent of

{ tmp = x(); tmp.f }