Skip to main content

loop_body_has_direct_break

Function loop_body_has_direct_break 

Source
pub fn loop_body_has_direct_break(body: &[Statement]) -> bool
Expand description

Whether a loop body contains a break that belongs to that loop — looking through if/try/with blocks but not into nested loops (whose breaks are their own) or nested definitions. Loops with an else clause only need break-tracking machinery when this is true.