Skip to content

Commit 6fa9746

Browse files
committed
---
yaml --- r: 66495 b: refs/heads/master c: 45e2582 h: refs/heads/master i: 66493: d9f9519 66491: fa2c9e2 66487: 8a0477d 66479: 1ad0de5 66463: e1ac880 66431: 50ab1a6 v: v3
1 parent 26ed117 commit 6fa9746

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 7f3752c7f95a2439db774d977da0caa299ef48e6
2+
refs/heads/master: 45e2582e09dd97d01a01e351c47da210bd6803f3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/src/librustc/middle/trans/closure.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,9 @@ pub fn make_closure_glue(
486486
}
487487
}
488488

489+
// note: unique pointers no longer copy the type descriptor in the take glue,
490+
// so we cannot delegate to the unique box take glue here without copying it
491+
// ourselves
489492
pub fn make_opaque_cbox_take_glue(
490493
bcx: block,
491494
sigil: ast::Sigil,

trunk/src/librustc/middle/trans/uniq.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,5 @@ pub fn duplicate(bcx: block, src_box: ValueRef, src_ty: ty::t) -> Result {
5252
} = malloc_unique(bcx, body_datum.ty);
5353
body_datum.copy_to(bcx, datum::INIT, dst_body);
5454

55-
// Copy the type descriptor
56-
let src_tydesc_ptr = GEPi(bcx, src_box,
57-
[0u, back::abi::box_field_tydesc]);
58-
let dst_tydesc_ptr = GEPi(bcx, dst_box,
59-
[0u, back::abi::box_field_tydesc]);
60-
let td = Load(bcx, src_tydesc_ptr);
61-
Store(bcx, td, dst_tydesc_ptr);
62-
63-
return rslt(bcx, dst_box);
55+
rslt(bcx, dst_box)
6456
}

0 commit comments

Comments
 (0)