pub struct CfgBlock {
pub index: usize,
pub is_cleanup: bool,
pub next: FxHashSet<usize>,
pub scc: SccInfo,
}Expand description
Reusable CFG block structure shared by analyses built over MIR.
Each CfgBlock corresponds to a MIR basic block and stores:
- its block index,
- whether it is a cleanup block,
- its outgoing CFG edges,
- and SCC metadata for loop/cycle-aware traversal.
Terminator data is intentionally not cached here; use
ControlFlowGraph::terminator to retrieve it on demand from MIR.
Fields§
§index: usizeIndex of this block in the CFG block list.
is_cleanup: boolWhether this block belongs to MIR cleanup/unwind control flow.
next: FxHashSet<usize>Outgoing successor block indices.
scc: SccInfoSCC information for this block.
For non-root blocks inside an SCC, enter points to the SCC root.
For SCC roots, this field also stores member nodes, exits, and back edges.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CfgBlock
impl RefUnwindSafe for CfgBlock
impl Send for CfgBlock
impl Sync for CfgBlock
impl Unpin for CfgBlock
impl UnwindSafe for CfgBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more