Skip to content

Commit 53a4475

Browse files
dotdashalexcrichton
authored andcommitted
---
yaml --- r: 152818 b: refs/heads/try2 c: a0ec902 h: refs/heads/master v: v3
1 parent e9908a4 commit 53a4475

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: e4e3550ff6ee1754ea4d7191989044c444bff049
8+
refs/heads/try2: a0ec902e239b2219edf1a18b036dd32c18d3be42
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/trans/expr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,6 @@ fn trans_rvalue_stmt_unadjusted<'a>(bcx: &'a Block<'a>,
610610
controlflow::trans_loop(bcx, expr.id, &**body)
611611
}
612612
ast::ExprAssign(ref dst, ref src) => {
613-
let src_datum = unpack_datum!(bcx, trans(bcx, &**src));
614613
let dst_datum = unpack_datum!(bcx, trans_to_lvalue(bcx, &**dst, "assign"));
615614

616615
if ty::type_needs_drop(bcx.tcx(), dst_datum.ty) {
@@ -630,12 +629,13 @@ fn trans_rvalue_stmt_unadjusted<'a>(bcx: &'a Block<'a>,
630629
//
631630
// We could avoid this intermediary with some analysis
632631
// to determine whether `dst` may possibly own `src`.
632+
let src_datum = unpack_datum!(bcx, trans(bcx, &**src));
633633
let src_datum = unpack_datum!(
634634
bcx, src_datum.to_rvalue_datum(bcx, "ExprAssign"));
635635
bcx = glue::drop_ty(bcx, dst_datum.val, dst_datum.ty);
636636
src_datum.store_to(bcx, dst_datum.val)
637637
} else {
638-
src_datum.store_to(bcx, dst_datum.val)
638+
trans_into(bcx, &**src, SaveIn(dst_datum.to_llref()))
639639
}
640640
}
641641
ast::ExprAssignOp(op, ref dst, ref src) => {

0 commit comments

Comments
 (0)