Skip to content

Commit d25496f

Browse files
committed
Remove an unnecessary dtor computation and use the cached query result instead
1 parent f391497 commit d25496f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: compiler/rustc_mir_transform/src/check_const_item_mutation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl<'tcx> ConstMutationChecker<'_, 'tcx> {
5353
//
5454
// #[const_mutation_allowed]
5555
// pub const LOG: Log = Log { msg: "" };
56-
match self.tcx.calculate_dtor(def_id, |_, _| Ok(())) {
56+
match self.tcx.adt_destructor(def_id) {
5757
Some(_) => None,
5858
None => Some(def_id),
5959
}

0 commit comments

Comments
 (0)