Skip to main content

defaulted_counter_loop

Function defaulted_counter_loop 

Source
fn defaulted_counter_loop<'gcx>(
    gcx: Gcx<'gcx>,
    block: &'gcx Block<'gcx>,
) -> Option<&'gcx Stmt<'gcx>>
Expand description

The loop statement of a conventional for (uint i; i < n; i++) header whose counter relies on its implicit zero. The header lowers to { decl; loop { if cond { body } else break } } with the update on the loop source; matching the wrapper’s span keeps declarations outside the header distinct.