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

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

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]

impl<'s, D: ConstraintGraphDirecton> WithSuccessors for RegionGraph<'s, D>[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]

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]