@@ -126,7 +126,7 @@ impl<'a, 'tcx> CoherenceChecker<'a, 'tcx> {
126126 // Populate the table of destructors. It might seem a bit strange to
127127 // do this here, but it's actually the most convenient place, since
128128 // the coherence tables contain the trait -> type mappings.
129- self . populate_destructor_table ( ) ;
129+ self . populate_destructors ( ) ;
130130
131131 // Check to make sure implementations of `Copy` are legal.
132132 self . check_implementations_of_copy ( ) ;
@@ -286,7 +286,7 @@ impl<'a, 'tcx> CoherenceChecker<'a, 'tcx> {
286286 // Destructors
287287 //
288288
289- fn populate_destructor_table ( & self ) {
289+ fn populate_destructors ( & self ) {
290290 let tcx = self . crate_context . tcx ;
291291 let drop_trait = match tcx. lang_items . drop_trait ( ) {
292292 Some ( id) => id, None => { return }
@@ -309,9 +309,6 @@ impl<'a, 'tcx> CoherenceChecker<'a, 'tcx> {
309309 ty:: TyEnum ( type_def, _) |
310310 ty:: TyStruct ( type_def, _) => {
311311 type_def. set_destructor ( method_def_id. def_id ( ) ) ;
312- tcx. destructors
313- . borrow_mut ( )
314- . insert ( method_def_id. def_id ( ) ) ;
315312 }
316313 _ => {
317314 // Destructors only work on nominal types.
0 commit comments