[−][src]Struct rustc_middle::mir::traversal::Postorder

pub struct Postorder<'a, 'tcx> {
    body: &'a Body<'tcx>,
    visited: BitSet<BasicBlock>,
    visit_stack: Vec<(BasicBlock, Successors<'a>)>,
    root_is_start_block: bool,
}

Postorder traversal of a graph.

Postorder traversal is when each node is visited after all of its successors, except when the successor is only reachable by a back-edge


        A
       / \
      /   \
     B     C
      \   /
       \ /
        D

A Postorder traversal of this graph is D B C A or D C B A

Fields

body: &'a Body<'tcx>visited: BitSet<BasicBlock>visit_stack: Vec<(BasicBlock, Successors<'a>)>root_is_start_block: bool

Implementations

impl<'a, 'tcx> Postorder<'a, 'tcx>[src]

pub fn new(body: &'a Body<'tcx>, root: BasicBlock) -> Postorder<'a, 'tcx>ⓘ

Notable traits for Postorder<'a, 'tcx>

impl<'a, 'tcx> Iterator for Postorder<'a, 'tcx> type Item = (BasicBlock, &'a BasicBlockData<'tcx>);
[src]

pub(in mir::traversal) fn traverse_successor(
    &mut self
)
[src]

Trait Implementations

impl<'a, 'tcx> Iterator for Postorder<'a, 'tcx>[src]

type Item = (BasicBlock, &'a BasicBlockData<'tcx>)

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a, 'tcx> !RefUnwindSafe for Postorder<'a, 'tcx>

impl<'a, 'tcx> !Send for Postorder<'a, 'tcx>

impl<'a, 'tcx> !Sync for Postorder<'a, 'tcx>

impl<'a, 'tcx> Unpin for Postorder<'a, 'tcx> where
    'tcx: 'a, 

impl<'a, 'tcx> !UnwindSafe for Postorder<'a, 'tcx>

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<'a, T> Captures<'a> 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<I> IntoIterator for I where
    I: Iterator, 
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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

type Error = !

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]