Normalize the whole PolyTypeOutlivesPredicate, more simplifications
This commit is contained in:
parent
a371059933
commit
e951bcff96
10 changed files with 92 additions and 81 deletions
|
@ -1,5 +1,6 @@
|
|||
use rustc_infer::infer::outlives::env::OutlivesEnvironment;
|
||||
use rustc_infer::infer::{InferCtxt, RegionResolutionError};
|
||||
use rustc_middle::traits::query::NoSolution;
|
||||
use rustc_middle::traits::ObligationCause;
|
||||
|
||||
pub trait InferCtxtRegionExt<'tcx> {
|
||||
|
@ -24,15 +25,14 @@ impl<'tcx> InferCtxtRegionExt<'tcx> for InferCtxt<'tcx> {
|
|||
let ty = self.resolve_vars_if_possible(ty);
|
||||
|
||||
if self.next_trait_solver() {
|
||||
crate::solve::deeply_normalize_with_skipped_universes(
|
||||
crate::solve::deeply_normalize(
|
||||
self.at(
|
||||
&ObligationCause::dummy_with_span(origin.span()),
|
||||
outlives_env.param_env,
|
||||
),
|
||||
ty,
|
||||
vec![None; ty.outer_exclusive_binder().as_usize()],
|
||||
)
|
||||
.map_err(|_| ty)
|
||||
.map_err(|_| NoSolution)
|
||||
} else {
|
||||
Ok(ty)
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue