type SolverRegionConstraint<'tcx> = RegionConstraint<TyCtxt<'tcx>>;Aliased Type§
enum SolverRegionConstraint<'tcx> {
Ambiguity,
RegionOutlives(Region<'tcx>, Region<'tcx>),
AliasTyOutlivesViaEnv(Binder<TyCtxt<'tcx>, (AliasTy<TyCtxt<'tcx>>, Region<'tcx>)>),
PlaceholderTyOutlives(Ty<'tcx>, Region<'tcx>),
And(Box<[RegionConstraint<TyCtxt<'tcx>>]>),
Or(Box<[RegionConstraint<TyCtxt<'tcx>>]>),
}Variants§
Ambiguity
RegionOutlives(Region<'tcx>, Region<'tcx>)
AliasTyOutlivesViaEnv(Binder<TyCtxt<'tcx>, (AliasTy<TyCtxt<'tcx>>, Region<'tcx>)>)
Requirement that a (potentially higher ranked) alias outlives some (potentially higher ranked) region due to an assumption in the environment. This cannot be satisfied via component outlives or item bounds.
We cannot eagerly look at assumptions as we are usually working with an incomplete set of assumptions and there may wind up being assumptions we can use to prove this when we’re in a smaller universe.
We eagerly destructure alias outlives requirements into region outlives requirements corresponding to component outlives & item bound outlives rules, leaving only param env candidates.
PlaceholderTyOutlives(Ty<'tcx>, Region<'tcx>)
This is an I::Ty for two reasons:
- We need the type visitable impl to be able to
visit_tyon this so canonicalization knows about the placeholder - When exiting the trait solver there may be placeholder outlives corresponding to params
from the root universe. These need to be changed from a
Placeholderto the originalParam.
We cannot eagerly look at assumptions as we are usually working with an incomplete set of assumptions and there may wind up being assumptions we can use to prove this when we’re in a smaller universe.
And(Box<[RegionConstraint<TyCtxt<'tcx>>]>)
Or(Box<[RegionConstraint<TyCtxt<'tcx>>]>)
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.