fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
2.3 KiB61 linesraw
1error: the variable `_index` is used as a loop counter
2  --> $DIR/explicit_counter_loop.rs:7:5
3   |
4LL |     for _v in &vec {
5   |     ^^^^^^^^^^^^^^ help: consider using: `for (_index, _v) in vec.iter().enumerate()`
6   |
7   = note: `-D clippy::explicit-counter-loop` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::explicit_counter_loop)]`
9
10error: the variable `_index` is used as a loop counter
11  --> $DIR/explicit_counter_loop.rs:15:5
12   |
13LL |     for _v in &vec {
14   |     ^^^^^^^^^^^^^^ help: consider using: `for (_index, _v) in vec.iter().enumerate()`
15
16error: the variable `_index` is used as a loop counter
17  --> $DIR/explicit_counter_loop.rs:21:5
18   |
19LL |     for _v in &mut vec {
20   |     ^^^^^^^^^^^^^^^^^^ help: consider using: `for (_index, _v) in vec.iter_mut().enumerate()`
21
22error: the variable `_index` is used as a loop counter
23  --> $DIR/explicit_counter_loop.rs:27:5
24   |
25LL |     for _v in vec {
26   |     ^^^^^^^^^^^^^ help: consider using: `for (_index, _v) in vec.into_iter().enumerate()`
27
28error: the variable `count` is used as a loop counter
29  --> $DIR/explicit_counter_loop.rs:115:9
30   |
31LL |         for ch in text.chars() {
32   |         ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (count, ch) in text.chars().enumerate()`
33
34error: the variable `count` is used as a loop counter
35  --> $DIR/explicit_counter_loop.rs:127:9
36   |
37LL |         for ch in text.chars() {
38   |         ^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `for (count, ch) in text.chars().enumerate()`
39
40error: the variable `count` is used as a loop counter
41  --> $DIR/explicit_counter_loop.rs:186:9
42   |
43LL |         for _i in 3..10 {
44   |         ^^^^^^^^^^^^^^^ help: consider using: `for (count, _i) in (3..10).enumerate()`
45
46error: the variable `idx_usize` is used as a loop counter
47  --> $DIR/explicit_counter_loop.rs:227:9
48   |
49LL |         for _item in slice {
50   |         ^^^^^^^^^^^^^^^^^^ help: consider using: `for (idx_usize, _item) in slice.iter().enumerate()`
51
52error: the variable `idx_u32` is used as a loop counter
53  --> $DIR/explicit_counter_loop.rs:240:9
54   |
55LL |         for _item in slice {
56   |         ^^^^^^^^^^^^^^^^^^ help: consider using: `for (idx_u32, _item) in (0_u32..).zip(slice.iter())`
57   |
58   = note: `idx_u32` is of type `u32`, making it ineligible for `Iterator::enumerate`
59
60error: aborting due to 9 previous errors
61