diff --git a/compiler/rustc_mir/src/transform/check_const_item_mutation.rs b/compiler/rustc_mir/src/transform/check_const_item_mutation.rs index aae67949945..112c25a3129 100644 --- a/compiler/rustc_mir/src/transform/check_const_item_mutation.rs +++ b/compiler/rustc_mir/src/transform/check_const_item_mutation.rs @@ -46,7 +46,7 @@ impl<'a, 'tcx> ConstMutationChecker<'a, 'tcx> { // // LOG.msg = "wow"; // prints "wow" // - match self.tcx.adt_def(def_id).destructor(self.tcx) { + match self.tcx.adt_destructor(def_id) { Some(_) => None, None => Some(def_id), }