1
Fork 0

Remove an unnecessary dtor computation and use the cached query result instead

This commit is contained in:
Oli Scherer 2025-03-27 12:03:48 +00:00
parent a7b687c26e
commit aec7739837

View file

@ -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),
}