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.

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.

Returns the non-transitive set of known outlives constraints between free regions.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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