fn clean_region_outlives_constraints<'tcx>(
regions: &RegionConstraintData<'tcx>,
generics: &'tcx Generics,
) -> ThinVec<WherePredicate>
Expand description
Clean region outlives constraints to where-predicates.
This is essentially a simplified version of lexical_region_resolve
.
However, here we determine what needs to be true in order for an impl to hold.
lexical_region_resolve
, along with much of the rest of the compiler, is concerned
with determining if a given set up constraints / predicates are met, given some
starting conditions like user-provided code.
For this reason, it’s easier to perform the calculations we need on our own, rather than trying to make existing inference/solver code do what we want.