Skip to content

Commit c3353bd

Browse files
committed
---
yaml --- r: 72591 b: refs/heads/dist-snap c: 1c64f7a h: refs/heads/master i: 72589: b466c21 72587: c93accd 72583: 0c90186 72575: 73a48dd v: v3
1 parent 138a821 commit c3353bd

File tree

3 files changed

+8
-21
lines changed

3 files changed

+8
-21
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 89377eafe163eee7f636a758ef117399f58c3598
10+
refs/heads/dist-snap: 1c64f7a0f73dde275ba06cdfd3c3b6b5f2f9e39d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/middle/trans/glue.rs

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -443,11 +443,8 @@ pub fn make_free_glue(bcx: block, v: ValueRef, t: ty::t) {
443443
// Call the dtor if there is one
444444
match ty::ty_dtor(bcx.tcx(), did) {
445445
ty::NoDtor => bcx,
446-
ty::LegacyDtor(ref dt_id) => {
447-
trans_struct_drop(bcx, t, v, *dt_id, did, substs, false)
448-
}
449446
ty::TraitDtor(ref dt_id) => {
450-
trans_struct_drop(bcx, t, v, *dt_id, did, substs, true)
447+
trans_struct_drop(bcx, t, v, *dt_id, did, substs)
451448
}
452449
}
453450
}
@@ -461,8 +458,7 @@ pub fn trans_struct_drop(bcx: block,
461458
v0: ValueRef,
462459
dtor_did: ast::def_id,
463460
class_did: ast::def_id,
464-
substs: &ty::substs,
465-
take_ref: bool)
461+
substs: &ty::substs)
466462
-> block {
467463
let repr = adt::represent_type(bcx.ccx(), t);
468464
let drop_flag = adt::trans_drop_flag_ptr(bcx, repr, v0);
@@ -484,15 +480,10 @@ pub fn trans_struct_drop(bcx: block,
484480
// (self)
485481
assert!((params.len() == 2));
486482

487-
// If we need to take a reference to the class (because it's using
488-
// the Drop trait), do so now.
489-
let llval;
490-
if take_ref {
491-
llval = alloca(bcx, val_ty(v0));
492-
Store(bcx, v0, llval);
493-
} else {
494-
llval = v0;
495-
}
483+
// Take a reference to the class (because it's using the Drop trait),
484+
// do so now.
485+
let llval = alloca(bcx, val_ty(v0));
486+
Store(bcx, v0, llval);
496487

497488
let self_arg = PointerCast(bcx, llval, params[1]);
498489
let args = ~[C_null(T_ptr(T_i8())), self_arg];
@@ -534,10 +525,7 @@ pub fn make_drop_glue(bcx: block, v0: ValueRef, t: ty::t) {
534525
let tcx = bcx.tcx();
535526
match ty::ty_dtor(tcx, did) {
536527
ty::TraitDtor(dtor) => {
537-
trans_struct_drop(bcx, t, v0, dtor, did, substs, true)
538-
}
539-
ty::LegacyDtor(dtor) => {
540-
trans_struct_drop(bcx, t, v0, dtor, did, substs, false)
528+
trans_struct_drop(bcx, t, v0, dtor, did, substs)
541529
}
542530
ty::NoDtor => {
543531
// No dtor? Just the default case

branches/dist-snap/src/librustc/middle/ty.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3728,7 +3728,6 @@ pub fn item_path_str(cx: ctxt, id: ast::def_id) -> ~str {
37283728

37293729
pub enum DtorKind {
37303730
NoDtor,
3731-
LegacyDtor(def_id),
37323731
TraitDtor(def_id)
37333732
}
37343733

0 commit comments

Comments
 (0)