In inner loops (two or more levels deep) I now avoid the usage of
step_by, especially if the step value isn't a compile-time constant (extra note: LLVM is often not able to remove the
assert!(step != 0)). I think range loops with a step is a too much basic and important feature, I'd like to use it mindlessly as zero-cost abstraction over a while loop.
But perhaps this is not possible. So perhaps we can add a
Range::step method (and
RangeToInclusive::step too etc), that uses takes a generic value of type
Idx (the same type of the Range). This is a special-casing, but with a compiler (and not Clippy) deprecation/suggestion lint to avoid the usage of step_by in that common Range situation, this could help improve the current situation.