Skip to content

Commit 0930d38

Browse files
committed
rename schedule_drop_{enum,adt}_contents.
1 parent da2276e commit 0930d38

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/librustc_trans/trans/cleanup.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,10 @@ impl<'blk, 'tcx> CleanupMethods<'blk, 'tcx> for FunctionContext<'blk, 'tcx> {
438438
/// `ty`. The scheduled code handles extracting the discriminant
439439
/// and dropping the contents associated with that variant
440440
/// *without* executing any associated drop implementation.
441-
fn schedule_drop_enum_contents(&self,
442-
cleanup_scope: ScopeId,
443-
val: ValueRef,
444-
ty: Ty<'tcx>) {
441+
fn schedule_drop_adt_contents(&self,
442+
cleanup_scope: ScopeId,
443+
val: ValueRef,
444+
ty: Ty<'tcx>) {
445445
// `if` below could be "!contents_needs_drop"; skipping drop
446446
// is just an optimization, so sound to be conservative.
447447
if !self.type_needs_drop(ty) { return; }
@@ -455,7 +455,7 @@ impl<'blk, 'tcx> CleanupMethods<'blk, 'tcx> for FunctionContext<'blk, 'tcx> {
455455
skip_dtor: true,
456456
};
457457

458-
debug!("schedule_drop_enum_contents({:?}, val={}, ty={}) fill_on_drop={} skip_dtor={}",
458+
debug!("schedule_drop_adt_contents({:?}, val={}, ty={}) fill_on_drop={} skip_dtor={}",
459459
cleanup_scope,
460460
self.ccx.tn().val_to_string(val),
461461
ty.repr(self.ccx.tcx()),
@@ -1240,10 +1240,10 @@ pub trait CleanupMethods<'blk, 'tcx> {
12401240
cleanup_scope: ScopeId,
12411241
val: ValueRef,
12421242
ty: Ty<'tcx>);
1243-
fn schedule_drop_enum_contents(&self,
1244-
cleanup_scope: ScopeId,
1245-
val: ValueRef,
1246-
ty: Ty<'tcx>);
1243+
fn schedule_drop_adt_contents(&self,
1244+
cleanup_scope: ScopeId,
1245+
val: ValueRef,
1246+
ty: Ty<'tcx>);
12471247
fn schedule_drop_immediate(&self,
12481248
cleanup_scope: ScopeId,
12491249
val: ValueRef,

src/librustc_trans/trans/glue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ fn trans_struct_drop<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
383383

384384
// Issue #23611: schedule cleanup of contents, re-inspecting the
385385
// discriminant (if any) in case of variant swap in drop code.
386-
bcx.fcx.schedule_drop_enum_contents(cleanup::CustomScope(contents_scope), v0, t);
386+
bcx.fcx.schedule_drop_adt_contents(cleanup::CustomScope(contents_scope), v0, t);
387387

388388
let glue_type = get_drop_glue_type(bcx.ccx(), t);
389389
let dtor_ty = ty::mk_ctor_fn(bcx.tcx(), class_did, &[glue_type], ty::mk_nil(bcx.tcx()));

0 commit comments

Comments
 (0)