pub struct ControlFlowFact {
pub kind: ControlFlowKind,
pub span: IrSpan,
pub depth: usize,
pub loop_depth: usize,
pub parent_branch: Option<BranchContext>,
pub else_info: Option<ElseInfo>,
pub containing_fn: Option<usize>,
}Expand description
A control flow construct with nesting context.
Fields§
§kind: ControlFlowKindDiscriminant: if, match, loop variant, or closure.
span: IrSpanLocation of the keyword.
depth: usizeNesting depth within the function body (for max-depth check).
loop_depth: usizeEnclosing loop count (for clone-in-loop suppression).
parent_branch: Option<BranchContext>Set when nested inside an if or match arm.
else_info: Option<ElseInfo>Present only for If nodes.
containing_fn: Option<usize>Index of the function containing this construct.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ControlFlowFact
impl RefUnwindSafe for ControlFlowFact
impl Send for ControlFlowFact
impl Sync for ControlFlowFact
impl Unpin for ControlFlowFact
impl UnsafeUnpin for ControlFlowFact
impl UnwindSafe for ControlFlowFact
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, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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