Struct rustc_mir::borrow_check::region_infer::values::LivenessValues[][src]

pub(crate) struct LivenessValues<N: Idx> {
    elements: Rc<RegionValueElements>,
    points: SparseBitMatrix<N, PointIndex>,
}

When we initially compute liveness, we use a bit matrix storing points for each region-vid.

Fields

elements: Rc<RegionValueElements>points: SparseBitMatrix<N, PointIndex>

Implementations

impl<N: Idx> LivenessValues<N>[src]

pub(crate) fn new(elements: Rc<RegionValueElements>) -> Self[src]

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.

pub(crate) fn rows(&self) -> impl Iterator<Item = N>[src]

Iterate through each region that has a value in this set.

pub(crate) fn add_element(&mut self, row: N, location: Location) -> bool[src]

Adds the given element to the value for the given region. Returns whether the element is newly added (i.e., was not already present).

pub(crate) fn add_elements(
    &mut self,
    row: N,
    locations: &HybridBitSet<PointIndex>
) -> bool
[src]

Adds all the elements in the given bit array into the given region. Returns whether any of them are newly added.

pub(crate) fn add_all_points(&mut self, row: N)[src]

Adds all the control-flow points to the values for r.

pub(crate) fn contains(&self, row: N, location: Location) -> bool[src]

Returns true if the region r contains the given element.

pub(crate) fn region_value_str(&self, r: N) -> String[src]

Returns a “pretty” string value of the region. Meant for debugging.

Auto Trait Implementations

impl<N> !RefUnwindSafe for LivenessValues<N>

impl<N> !Send for LivenessValues<N>

impl<N> !Sync for LivenessValues<N>

impl<N> Unpin for LivenessValues<N>

impl<N> UnwindSafe for LivenessValues<N>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]