From bb760b53bf7f9593c09a03e5dea28ef5f31065d7 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 26 Sep 2020 18:36:01 -0700 Subject: [PATCH] Simplify defid destructor check --- compiler/rustc_mir/src/transform/check_const_item_mutation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 aae679499459..112c25a31293 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), }