[−][src]Struct rustc_mir::borrow_check::constraints::graph::RegionGraph
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: RegionVidImplementations
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]
set: &'s OutlivesConstraintSet,
constraint_graph: &'s ConstraintGraph<D>,
static_region: RegionVid
) -> Self
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]
&self,
region_sup: RegionVid
) -> Successors<'_, D>ⓘ
Notable traits for Successors<'s, D>
impl<'s, D: ConstraintGraphDirecton> Iterator for Successors<'s, D> type Item = RegionVid;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]
pub fn successors(&self, node: Self::Node) -> Self::Iter[src]
pub fn depth_first_search(&self, from: Self::Node) -> DepthFirstSearch<'_, Self> where
Self: WithNumNodes, [src]
Self: WithNumNodes,
Auto Trait Implementations
impl<'s, D> RefUnwindSafe for RegionGraph<'s, D> where
D: RefUnwindSafe,
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,
D: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.