Apply impl_super_outlives optimization to new trait solver

This commit is contained in:
Michael Goulet
2025-06-19 21:03:10 +00:00
parent 8de4c7234d
commit 24ea06cbe8
3 changed files with 20 additions and 9 deletions

View File

@@ -432,6 +432,13 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
self.explicit_implied_predicates_of(def_id).map_bound(|preds| preds.into_iter().copied())
}
fn impl_super_outlives(
self,
impl_def_id: DefId,
) -> ty::EarlyBinder<'tcx, impl IntoIterator<Item = ty::Clause<'tcx>>> {
self.impl_super_outlives(impl_def_id)
}
fn impl_is_const(self, def_id: DefId) -> bool {
debug_assert_matches!(self.def_kind(def_id), DefKind::Impl { of_trait: true });
self.is_conditionally_const(def_id)