Skip to main content

ascending_cadence

Function ascending_cadence 

Source
fn ascending_cadence<'hir>(
    hir: &'hir Hir<'hir>,
    body: &'hir [Stmt<'hir>],
) -> Vec<VariableId>
Expand description

The loop’s own indices that step upward unconditionally: a bare identifier advanced by i++, i += <positive literal>, or i = i + <positive literal> (with either addition order) as a straight-line statement of the body (a for’s desugared post-step lands here, a while’s in-body counter too). A step under a branch, a reset (i = 0), a no-op (i += 0), a decrement, or composite arithmetic (i = (i + 2) - 1) does not qualify: the walk is only known to ascend for the simple forms.