Struct rustc_mir::borrow_check::nll::region_infer::values::RegionValues [−][src]
struct RegionValues { elements: Rc<RegionValueElements>, matrix: SparseBitMatrix<RegionVid, RegionElementIndex>, causes: Option<FxHashMap<(RegionVid, RegionElementIndex), Rc<Cause>>>, }
🔬 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 values for a set of regions. These are stored in a
compact SparseBitMatrix
representation, with one row per region
variable. The columns consist of either universal regions or
points in the CFG.
Fields
elements: Rc<RegionValueElements>
🔬 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?
matrix: SparseBitMatrix<RegionVid, RegionElementIndex>
🔬 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?
causes: Option<FxHashMap<(RegionVid, RegionElementIndex), Rc<Cause>>>
🔬 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?
If cause tracking is enabled, maps from a pair (r, e)
consisting of a region r
that contains some element e
to
the reason that the element is contained. There should be an
entry for every bit set to 1 in SparseBitMatrix
.
Methods
impl RegionValues
[src]
impl RegionValues
fn new(elements: &Rc<RegionValueElements>, num_region_variables: usize) -> Self
[src]
fn new(elements: &Rc<RegionValueElements>, num_region_variables: usize) -> Self
🔬 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?
Creates a new set of "region values" that tracks causal information. Each of the regions in num_region_variables will be initialized with an empty set of points and no causal information.
fn duplicate(&self, track_causes: TrackCauses) -> Self
[src]
fn duplicate(&self, track_causes: TrackCauses) -> Self
🔬 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?
Duplicates the region values. If track_causes is false, then the resulting value will not track causal information (and any existing causal information is dropped). Otherwise, the causal information is preserved and maintained. Tracking the causal information makes region propagation significantly slower, so we prefer not to do it until an error is reported.
fn add<E: ToElementIndex>(
&mut self,
r: RegionVid,
elem: E,
cause: &Cause
) -> bool
[src]
fn add<E: ToElementIndex>(
&mut self,
r: RegionVid,
elem: E,
cause: &Cause
) -> 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?
Adds the given element to the value for the given region. Returns true if the element is newly added (i.e., was not already present).
fn add_internal<F>(
&mut self,
r: RegionVid,
i: RegionElementIndex,
make_cause: F
) -> bool where
F: FnOnce(&FxHashMap<(RegionVid, RegionElementIndex), Rc<Cause>>) -> Cause,
[src]
fn add_internal<F>(
&mut self,
r: RegionVid,
i: RegionElementIndex,
make_cause: F
) -> bool where
F: FnOnce(&FxHashMap<(RegionVid, RegionElementIndex), Rc<Cause>>) -> Cause,
🔬 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?
Internal method to add an element to a region.
Takes a "lazy" cause -- this function will return the cause, but it will only be invoked if cause tracking is enabled.
fn add_due_to_outlives<T: ToElementIndex>(
&mut self,
from_region: RegionVid,
to_region: RegionVid,
elem: T,
constraint_location: Location,
constraint_span: Span
) -> bool
[src]
fn add_due_to_outlives<T: ToElementIndex>(
&mut self,
from_region: RegionVid,
to_region: RegionVid,
elem: T,
constraint_location: Location,
constraint_span: Span
) -> 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?
Adds elem
to to_region
because of a relation:
to_region: from_region @ constraint_location
that was added by the cod at constraint_span
.
fn add_universal_regions_outlived_by(
&mut self,
from_region: RegionVid,
to_region: RegionVid,
constraint_location: Location,
constraint_span: Span
) -> bool
[src]
fn add_universal_regions_outlived_by(
&mut self,
from_region: RegionVid,
to_region: RegionVid,
constraint_location: Location,
constraint_span: Span
) -> 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?
Adds all the universal regions outlived by from_region
to
to_region
.
fn contains<E: ToElementIndex>(&self, r: RegionVid, elem: E) -> bool
[src]
fn contains<E: ToElementIndex>(&self, r: RegionVid, elem: E) -> 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 the region r
contains the given element.
fn element_indices_contained_in<'a>(
&'a self,
r: RegionVid
) -> impl Iterator<Item = RegionElementIndex> + 'a
[src]
fn element_indices_contained_in<'a>(
&'a self,
r: RegionVid
) -> impl Iterator<Item = RegionElementIndex> + 'a
🔬 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?
Iterate over the value of the region r
, yielding up element
indices. You may prefer universal_regions_outlived_by
or
elements_contained_in
.
fn universal_regions_outlived_by<'a>(
&'a self,
r: RegionVid
) -> impl Iterator<Item = RegionVid> + 'a
[src]
fn universal_regions_outlived_by<'a>(
&'a self,
r: RegionVid
) -> impl Iterator<Item = RegionVid> + 'a
🔬 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 just the universal regions that are contained in a given region's value.
fn elements_contained_in<'a>(
&'a self,
r: RegionVid
) -> impl Iterator<Item = RegionElement> + 'a
[src]
fn elements_contained_in<'a>(
&'a self,
r: RegionVid
) -> impl Iterator<Item = RegionElement> + 'a
🔬 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 all the elements contained in a given region's value.
fn region_value_str(&self, r: RegionVid) -> String
[src]
fn region_value_str(&self, r: RegionVid) -> String
🔬 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 "pretty" string value of the region. Meant for debugging.
fn push_location_range(
str: &mut String,
location1: Location,
location2: Location
)
[src]
fn push_location_range(
str: &mut String,
location1: Location,
location2: Location
)
🔬 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?
fn cause<T: ToElementIndex>(&self, r: RegionVid, elem: T) -> Option<Rc<Cause>>
[src]
fn cause<T: ToElementIndex>(&self, r: RegionVid, elem: T) -> Option<Rc<Cause>>
🔬 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 a region r
that contains the element elem
, returns the Cause
that tells us why elem
is found in that region.
Returns None if cause tracking is disabled or elem
is not
actually found in r
.
Auto Trait Implementations
impl !Send for RegionValues
impl !Send for RegionValues
impl !Sync for RegionValues
impl !Sync for RegionValues