1
Fork 0

Apply suggestions from review

This commit is contained in:
Michael Goulet 2024-01-26 19:18:14 +00:00
parent dc050f6d5b
commit 720d7a7a03
11 changed files with 77 additions and 50 deletions

View file

@ -20,12 +20,15 @@ impl<'tcx> InferCtxtRegionExt<'tcx> for InferCtxt<'tcx> {
&self,
outlives_env: &OutlivesEnvironment<'tcx>,
) -> Vec<RegionResolutionError<'tcx>> {
self.resolve_regions(outlives_env, |ty| {
self.resolve_regions_with_normalize(outlives_env, |ty, origin| {
let ty = self.resolve_vars_if_possible(ty);
if self.next_trait_solver() {
crate::solve::deeply_normalize(
self.at(&ObligationCause::dummy(), outlives_env.param_env),
self.at(
&ObligationCause::dummy_with_span(origin.span()),
outlives_env.param_env,
),
ty,
)
.map_err(|_| ty)

View file

@ -179,7 +179,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
}
let outlives_env = OutlivesEnvironment::new(full_env);
let _ = infcx.process_registered_region_obligations::<!>(&outlives_env, |ty| Ok(ty));
let _ = infcx.process_registered_region_obligations::<!>(&outlives_env, |ty, _| Ok(ty));
let region_data =
infcx.inner.borrow_mut().unwrap_region_constraints().region_constraint_data().clone();