pub(crate) struct UniversalRegionRelations<'tcx> {
universal_regions: Rc<UniversalRegions<'tcx>>,
outlives: TransitiveRelation<RegionVid>,
inverse_outlives: TransitiveRelation<RegionVid>,
}Fields
universal_regions: Rc<UniversalRegions<'tcx>>outlives: TransitiveRelation<RegionVid>Stores the outlives relations that are known to hold from the implied bounds, in-scope where-clauses, and that sort of thing.
inverse_outlives: TransitiveRelation<RegionVid>This is the <= relation; that is, if a: b, then b <= a,
and we store that here. This is useful when figuring out how
to express some local region in terms of external regions our
caller will understand.
Implementations
Records in the outlives_relation (and
inverse_outlives_relation) that fr_a: fr_b. Invoked by the
builder below.
Given two universal regions, returns the postdominating upper-bound (effectively the least upper bound).
(See TransitiveRelation::postdom_upper_bound for details on
the postdominating upper bound in general.)
Finds an “upper bound” for fr that is not local. In other
words, returns the smallest (*) known region fr1 that (a)
outlives fr and (b) is not local.
(*) If there are multiple competing choices, we return all of them.
Returns the “postdominating” bound of the set of
non_local_upper_bounds for the given region.
Finds a “lower bound” for fr that is not local. In other
words, returns the largest (*) known region fr1 that (a) is
outlived by fr and (b) is not local.
(*) If there are multiple competing choices, we pick the “postdominating”
one. See TransitiveRelation::postdom_upper_bound for details.
fn non_local_bounds<'a>(
&self,
relation: &'a TransitiveRelation<RegionVid>,
fr0: &'a RegionVid
) -> Vec<&'a RegionVid>
fn non_local_bounds<'a>(
&self,
relation: &'a TransitiveRelation<RegionVid>,
fr0: &'a RegionVid
) -> Vec<&'a RegionVid>
Helper for non_local_upper_bounds and non_local_lower_bounds.
Repeatedly invokes postdom_parent until we find something that is not
local. Returns None if we never do so.
Returns true if fr1 is known to outlive fr2.
This will only ever be true for universally quantified regions.
Returns a vector of free regions x such that fr1: x is
known to hold.
Trait Implementations
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for UniversalRegionRelations
impl<'tcx> !Send for UniversalRegionRelations
impl<'tcx> !Sync for UniversalRegionRelations
impl<'tcx> Unpin for UniversalRegionRelations
impl<'tcx> !UnwindSafe for UniversalRegionRelations
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 264 bytes