[−][src]Struct rustc_mir::borrow_check::constraints::OutlivesConstraintSet

pub(crate) struct OutlivesConstraintSet {
    outlives: IndexVec<OutlivesConstraintIndex, OutlivesConstraint>,
}

A set of NLL region constraints. These include "outlives" constraints of the form R1: R2. Each constraint is identified by a unique OutlivesConstraintIndex and you can index into the set (constraint_set[i]) to access the constraint details.

Fields

outlives: IndexVec<OutlivesConstraintIndex, OutlivesConstraint>

Implementations

impl OutlivesConstraintSet[src]

pub(crate) fn push(&mut self, constraint: OutlivesConstraint)[src]

pub(crate) fn graph(&self, num_region_vars: usize) -> ConstraintGraph<Normal>[src]

Constructs a "normal" graph from the constraint set; the graph makes it easy to find the constraints affecting a particular region.

N.B., this graph contains a "frozen" view of the current constraints. Any new constraints added to the OutlivesConstraintSet after the graph is built will not be present in the graph.

pub(crate) fn reverse_graph(
    &self,
    num_region_vars: usize
) -> ConstraintGraph<Reverse>
[src]

Like graph, but constraints a reverse graph where R1: R2 represents an edge R2 -> R1.

pub(crate) fn compute_sccs(
    &self,
    constraint_graph: &ConstraintGraph<Normal>,
    static_region: RegionVid
) -> Sccs<RegionVid, ConstraintSccIndex>
[src]

Computes cycles (SCCs) in the graph of regions. In particular, find all regions R1, R2 such that R1: R2 and R2: R1 and group them into an SCC, and find the relationships between SCCs.

pub(crate) fn outlives(
    &self
) -> &IndexVec<OutlivesConstraintIndex, OutlivesConstraint>
[src]

Trait Implementations

impl Clone for OutlivesConstraintSet[src]

impl Default for OutlivesConstraintSet[src]

impl Index<OutlivesConstraintIndex> for OutlivesConstraintSet[src]

type Output = OutlivesConstraint

The returned type after indexing.

Auto Trait Implementations

impl RefUnwindSafe for OutlivesConstraintSet[src]

impl !Send for OutlivesConstraintSet[src]

impl !Sync for OutlivesConstraintSet[src]

impl Unpin for OutlivesConstraintSet[src]

impl UnwindSafe for OutlivesConstraintSet[src]

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> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

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]