Struct rustc_mir::borrow_check::nll::type_check::free_region_relations::UniversalRegionRelations [−][src]
pub(crate) struct UniversalRegionRelations<'tcx> {
universal_regions: Rc<UniversalRegions<'tcx>>,
outlives: TransitiveRelation<RegionVid>,
inverse_outlives: TransitiveRelation<RegionVid>,
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Fields
universal_regions: Rc<UniversalRegions<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
outlives: TransitiveRelation<RegionVid>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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 a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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.
Methods
impl<'tcx> UniversalRegionRelations<'tcx>[src]
impl<'tcx> UniversalRegionRelations<'tcx>fn relate_universal_regions(&mut self, fr_a: RegionVid, fr_b: RegionVid)[src]
fn relate_universal_regions(&mut self, fr_a: RegionVid, fr_b: RegionVid)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Records in the outlives_relation (and
inverse_outlives_relation) that fr_a: fr_b. Invoked by the
builder below.
pub(crate) fn postdom_upper_bound(
&self,
fr1: RegionVid,
fr2: RegionVid
) -> RegionVid[src]
pub(crate) fn postdom_upper_bound(
&self,
fr1: RegionVid,
fr2: RegionVid
) -> RegionVid🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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.)
pub(crate) fn non_local_upper_bound(&self, fr: RegionVid) -> RegionVid[src]
pub(crate) fn non_local_upper_bound(&self, fr: RegionVid) -> RegionVid🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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. This cannot fail, because
we will always find 'static at worst.
(*) If there are multiple competing choices, we pick the "postdominating"
one. See TransitiveRelation::postdom_upper_bound for details.
pub(crate) fn non_local_lower_bound(&self, fr: RegionVid) -> Option<RegionVid>[src]
pub(crate) fn non_local_lower_bound(&self, fr: RegionVid) -> Option<RegionVid>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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. This cannot fail,
because we will always find 'static at worst.
(*) If there are multiple competing choices, we pick the "postdominating"
one. See TransitiveRelation::postdom_upper_bound for details.
fn non_local_bound(
&self,
relation: &TransitiveRelation<RegionVid>,
fr0: RegionVid
) -> Option<RegionVid>[src]
fn non_local_bound(
&self,
relation: &TransitiveRelation<RegionVid>,
fr0: RegionVid
) -> Option<RegionVid>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Helper for non_local_upper_bound and
non_local_lower_bound. Repeatedly invokes postdom_parent
until we find something that is not local. Returns None if we
never do so.
pub(crate) fn outlives(&self, fr1: RegionVid, fr2: RegionVid) -> bool[src]
pub(crate) fn outlives(&self, fr1: RegionVid, fr2: RegionVid) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
True if fr1 is known to outlive fr2.
This will only ever be true for universally quantified regions.
pub(crate) fn regions_outlived_by(&self, fr1: RegionVid) -> Vec<&RegionVid>[src]
pub(crate) fn regions_outlived_by(&self, fr1: RegionVid) -> Vec<&RegionVid>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Returns a vector of free regions x such that fr1: x is
known to hold.
Trait Implementations
impl<'tcx> Debug for UniversalRegionRelations<'tcx>[src]
impl<'tcx> Debug for UniversalRegionRelations<'tcx>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'tcx> FreeRegionRelations<'tcx> for UniversalRegionRelations<'tcx>[src]
impl<'tcx> FreeRegionRelations<'tcx> for UniversalRegionRelations<'tcx>This trait is used by the impl-trait constraint code to abstract
over the FreeRegionMap from lexical regions and
UniversalRegions (from NLL)`.
fn sub_free_regions(&self, shorter: Region<'tcx>, longer: Region<'tcx>) -> bool[src]
fn sub_free_regions(&self, shorter: Region<'tcx>, longer: Region<'tcx>) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Tests whether r_a <= r_b. Both must be free regions or 'static. Read more
Auto Trait Implementations
impl<'tcx> !Send for UniversalRegionRelations<'tcx>
impl<'tcx> !Send for UniversalRegionRelations<'tcx>impl<'tcx> !Sync for UniversalRegionRelations<'tcx>
impl<'tcx> !Sync for UniversalRegionRelations<'tcx>