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: RegionVidImplementations
impl<'s, D: ConstraintGraphDirecton> RegionGraph<'s, D>[src]
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]
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]
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, D: ConstraintGraphDirecton> DirectedGraph for RegionGraph<'s, D>[src]impl<'s, 'graph, D: ConstraintGraphDirecton> GraphSuccessors<'graph> for RegionGraph<'s, D>[src]
impl<'s, 'graph, D: ConstraintGraphDirecton> GraphSuccessors<'graph> for RegionGraph<'s, D>[src]impl<'s, D: ConstraintGraphDirecton> WithNumNodes for RegionGraph<'s, D>[src]
impl<'s, D: ConstraintGraphDirecton> WithNumNodes for RegionGraph<'s, D>[src]impl<'s, D: ConstraintGraphDirecton> WithSuccessors for RegionGraph<'s, D>[src]
impl<'s, D: ConstraintGraphDirecton> WithSuccessors for RegionGraph<'s, D>[src]fn successors(
&self,
node: Self::Node
) -> <RegionGraph<'s, D> as GraphSuccessors<'_>>::Iter[src]
&self,
node: Self::Node
) -> <RegionGraph<'s, D> as GraphSuccessors<'_>>::Iter
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> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]