1 error: the loop variable `i` is only used to index `ns`.
2 --> $DIR/needless_range_loop.rs:17:14
7 = note: `-D clippy::needless-range-loop` implied by `-D warnings`
8 help: consider using an iterator
10 LL | for <item> in ns.iter().take(10).skip(3) {
11 | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
13 error: the loop variable `i` is only used to index `ms`.
14 --> $DIR/needless_range_loop.rs:38:14
16 LL | for i in 0..ms.len() {
18 help: consider using an iterator
20 LL | for <item> in &mut ms {
23 error: the loop variable `i` is only used to index `ms`.
24 --> $DIR/needless_range_loop.rs:44:14
26 LL | for i in 0..ms.len() {
28 help: consider using an iterator
30 LL | for <item> in &mut ms {
33 error: the loop variable `i` is only used to index `vec`.
34 --> $DIR/needless_range_loop.rs:68:14
36 LL | for i in x..x + 4 {
38 help: consider using an iterator
40 LL | for <item> in vec.iter_mut().skip(x).take(4) {
41 | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43 error: the loop variable `i` is only used to index `vec`.
44 --> $DIR/needless_range_loop.rs:75:14
46 LL | for i in x..=x + 4 {
48 help: consider using an iterator
50 LL | for <item> in vec.iter_mut().skip(x).take(4 + 1) {
51 | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53 error: the loop variable `i` is only used to index `arr`.
54 --> $DIR/needless_range_loop.rs:81:14
58 help: consider using an iterator
60 LL | for <item> in &arr {
63 error: the loop variable `i` is only used to index `arr`.
64 --> $DIR/needless_range_loop.rs:85:14
68 help: consider using an iterator
70 LL | for <item> in arr.iter().take(2) {
71 | ^^^^^^ ^^^^^^^^^^^^^^^^^^
73 error: the loop variable `i` is only used to index `arr`.
74 --> $DIR/needless_range_loop.rs:89:14
78 help: consider using an iterator
80 LL | for <item> in arr.iter().skip(1) {
81 | ^^^^^^ ^^^^^^^^^^^^^^^^^^
83 error: aborting due to 8 previous errors