@@ -610,7 +610,6 @@ fn trans_rvalue_stmt_unadjusted<'a>(bcx: &'a Block<'a>,
610
610
controlflow:: trans_loop ( bcx, expr. id , & * * body)
611
611
}
612
612
ast:: ExprAssign ( ref dst, ref src) => {
613
- let src_datum = unpack_datum ! ( bcx, trans( bcx, & * * src) ) ;
614
613
let dst_datum = unpack_datum ! ( bcx, trans_to_lvalue( bcx, & * * dst, "assign" ) ) ;
615
614
616
615
if ty:: type_needs_drop ( bcx. tcx ( ) , dst_datum. ty ) {
@@ -630,12 +629,13 @@ fn trans_rvalue_stmt_unadjusted<'a>(bcx: &'a Block<'a>,
630
629
//
631
630
// We could avoid this intermediary with some analysis
632
631
// to determine whether `dst` may possibly own `src`.
632
+ let src_datum = unpack_datum ! ( bcx, trans( bcx, & * * src) ) ;
633
633
let src_datum = unpack_datum ! (
634
634
bcx, src_datum. to_rvalue_datum( bcx, "ExprAssign" ) ) ;
635
635
bcx = glue:: drop_ty ( bcx, dst_datum. val , dst_datum. ty ) ;
636
636
src_datum. store_to ( bcx, dst_datum. val )
637
637
} else {
638
- src_datum . store_to ( bcx, dst_datum. val )
638
+ trans_into ( bcx, & * * src , SaveIn ( dst_datum. to_llref ( ) ) )
639
639
}
640
640
}
641
641
ast:: ExprAssignOp ( op, ref dst, ref src) => {
0 commit comments