You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recognize range-based for loops in #[unroll] (start with 0..const) #557
#[unroll] / #[unroll(N)] are shipped and macros already inject markers on `for` loops, but `mir-transforms` only recognizes counted `while` shapes. Idiomatic `#[unroll] for i in 0..N` is therefore a silent no-op (warn + skip) after Range desugars to Option / discriminant exits.
Proposed scope
Canonicalize or extend induction so post-import `for i in 0..CONST` (exclusive Range, step +1) is recognized as a counted loop.
Reuse existing full-unroll path once `LoopRecurrences` is filled.
Unit tests in `mir-transforms` (fixtures + unroll e2e); update pass docs.
Prefer warning clearly when a `for` is annotated but still unrecognized.
Activity
unroll: canonicalize annotated range-for loops in the kernel macro
nihalpasham commentedon Jul 30, 2026
Closing - refer to #559