Struct rustc_mir::borrow_check::constraints::graph::RegionGraph[−][src]

pub(crate) struct RegionGraph<'s, D: ConstraintGraphDirecton> {
    set: &'s OutlivesConstraintSet,
    constraint_graph: &'s ConstraintGraph<D>,
    static_region: RegionVid,
}
Expand description

This struct brings together a constraint set and a (normal, not reverse) constraint graph. It implements the graph traits and is usd for doing the SCC computation.

Fields

set: &'s OutlivesConstraintSetconstraint_graph: &'s ConstraintGraph<D>static_region: RegionVid

Implementations

impl<'s, D: ConstraintGraphDirecton> RegionGraph<'s, D>[src]

pub(crate) fn new(
    set: &'s OutlivesConstraintSet,
    constraint_graph: &'s ConstraintGraph<D>,
    static_region: RegionVid
) -> Self
[src]

Creates a “dependency graph” where each region constraint R1: R2 is treated as an edge R1 -> R2. We use this graph to construct SCCs for region inference but also for error reporting.

pub(crate) fn outgoing_regions(
    &self,
    region_sup: RegionVid
) -> Successors<'_, D>ⓘ

Notable traits for Successors<'s, D>

impl<'s, D: ConstraintGraphDirecton> Iterator for Successors<'s, D> type Item = RegionVid;
[src]

Given a region R, iterate over all regions R1 such that there exists a constraint R: R1.

Trait Implementations

impl<'s, D: ConstraintGraphDirecton> DirectedGraph for RegionGraph<'s, D>[src]

impl<'s, 'graph, D: ConstraintGraphDirecton> GraphSuccessors<'graph> for RegionGraph<'s, D>[src]

type Item = RegionVid

type Iter = Successors<'graph, D>

impl<'s, D: ConstraintGraphDirecton> WithNumNodes for RegionGraph<'s, D>[src]

fn num_nodes(&self) -> usize[src]

impl<'s, D: ConstraintGraphDirecton> WithSuccessors for RegionGraph<'s, D>[src]

fn successors(
    &self,
    node: Self::Node
) -> <RegionGraph<'s, D> as GraphSuccessors<'_>>::Iter
[src]

Auto Trait Implementations

impl<'s, D> RefUnwindSafe for RegionGraph<'s, D> where
    D: RefUnwindSafe, 

impl<'s, D> !Send for RegionGraph<'s, D>

impl<'s, D> !Sync for RegionGraph<'s, D>

impl<'s, D> Unpin for RegionGraph<'s, D>

impl<'s, D> UnwindSafe for RegionGraph<'s, D> where
    D: RefUnwindSafe, 

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> WithConstness for T[src]

fn with_constness(self, constness: Constness) -> ConstnessAnd<Self>[src]

fn with_const(self) -> ConstnessAnd<Self>[src]

fn without_const(self) -> ConstnessAnd<Self>[src]