about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform
diff options
context:
space:
mode:
authorOli Scherer <github333195615777966@oli-obk.de>2025-03-27 12:03:48 +0000
committerOli Scherer <github333195615777966@oli-obk.de>2025-04-01 09:25:12 +0000
commitaec77398378cc7af99043c3d1dd2394eb3d33c43 (patch)
tree4b579c8e5dd96de78ea7958dbe81a5e7469a3744 /compiler/rustc_mir_transform
parenta7b687c26ef55bfc3481761fef6e46154e5f95ea (diff)
Remove an unnecessary dtor computation and use the cached query result instead
Diffstat (limited to 'compiler/rustc_mir_transform')
-rw-r--r--compiler/rustc_mir_transform/src/check_const_item_mutation.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/check_const_item_mutation.rs b/compiler/rustc_mir_transform/src/check_const_item_mutation.rs
index ceea72c6755..76d1e671c5d 100644
--- a/compiler/rustc_mir_transform/src/check_const_item_mutation.rs
+++ b/compiler/rustc_mir_transform/src/check_const_item_mutation.rs
@@ -53,7 +53,7 @@ impl<'tcx> ConstMutationChecker<'_, 'tcx> {
         //
         //     #[const_mutation_allowed]
         //     pub const LOG: Log = Log { msg: "" };
-        match self.tcx.calculate_dtor(def_id, |_, _| Ok(())) {
+        match self.tcx.adt_destructor(def_id) {
             Some(_) => None,
             None => Some(def_id),
         }