reachable in rustc_middle::mir::traversal - Rust
Description: Returns an iterator over all basic blocks reachable from the `START_BLOCK` in no particular order.

Skip to main content

## reachable

# Function reachable

Source

    pub fn reachable<'a, 'tcx>(
        body: &'a Body<'tcx>,
    ) -> impl 'a + Iterator<Item = (BasicBlock, &'a BasicBlockData<'tcx>)>

Expand description

Returns an iterator over all basic blocks reachable from the `START_BLOCK` in no particular order.

This is clearer than writing `preorder` in cases where the order doesn’t matter.