@@ -126,7 +126,7 @@ impl<'a, 'tcx> CoherenceChecker<'a, 'tcx> {
126
126
// Populate the table of destructors. It might seem a bit strange to
127
127
// do this here, but it's actually the most convenient place, since
128
128
// the coherence tables contain the trait -> type mappings.
129
- self . populate_destructor_table ( ) ;
129
+ self . populate_destructors ( ) ;
130
130
131
131
// Check to make sure implementations of `Copy` are legal.
132
132
self . check_implementations_of_copy ( ) ;
@@ -286,7 +286,7 @@ impl<'a, 'tcx> CoherenceChecker<'a, 'tcx> {
286
286
// Destructors
287
287
//
288
288
289
- fn populate_destructor_table ( & self ) {
289
+ fn populate_destructors ( & self ) {
290
290
let tcx = self . crate_context . tcx ;
291
291
let drop_trait = match tcx. lang_items . drop_trait ( ) {
292
292
Some ( id) => id, None => { return }
@@ -309,9 +309,6 @@ impl<'a, 'tcx> CoherenceChecker<'a, 'tcx> {
309
309
ty:: TyEnum ( type_def, _) |
310
310
ty:: TyStruct ( type_def, _) => {
311
311
type_def. set_destructor ( method_def_id. def_id ( ) ) ;
312
- tcx. destructors
313
- . borrow_mut ( )
314
- . insert ( method_def_id. def_id ( ) ) ;
315
312
}
316
313
_ => {
317
314
// Destructors only work on nominal types.
0 commit comments