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 17 | 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 38 | for i in 0..ms.len() {
18 help: consider using an iterator
20 38 | 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 44 | for i in 0..ms.len() {
28 help: consider using an iterator
30 44 | 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 68 | for i in x..x + 4 {
38 help: consider using an iterator
40 68 | 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 75 | for i in x..=x + 4 {
48 help: consider using an iterator
50 75 | 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 81 | 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 85 | 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 89 | for <item> in arr.iter().skip(1) {
81 | ^^^^^^ ^^^^^^^^^^^^^^^^^^
83 error: aborting due to 8 previous errors