]> git.lizzy.rs Git - rust.git/blob - tests/ui/explicit_counter_loop.stderr
Merge branch 'master' into rustfmt_tests
[rust.git] / tests / ui / explicit_counter_loop.stderr
1 error: the variable `_index` is used as a loop counter. Consider using `for (_index, item) in &vec.enumerate()` or similar iterators
2   --> $DIR/explicit_counter_loop.rs:15:15
3    |
4 15 |     for _v in &vec {
5    |               ^^^^
6    |
7    = note: `-D clippy::explicit-counter-loop` implied by `-D warnings`
8
9 error: the variable `_index` is used as a loop counter. Consider using `for (_index, item) in &vec.enumerate()` or similar iterators
10   --> $DIR/explicit_counter_loop.rs:21:15
11    |
12 21 |     for _v in &vec {
13    |               ^^^^
14
15 error: the variable `count` is used as a loop counter. Consider using `for (count, item) in text.chars().enumerate()` or similar iterators
16   --> $DIR/explicit_counter_loop.rs:60:19
17    |
18 60 |         for ch in text.chars() {
19    |                   ^^^^^^^^^^^^
20
21 error: the variable `count` is used as a loop counter. Consider using `for (count, item) in text.chars().enumerate()` or similar iterators
22   --> $DIR/explicit_counter_loop.rs:71:19
23    |
24 71 |         for ch in text.chars() {
25    |                   ^^^^^^^^^^^^
26
27 error: aborting due to 4 previous errors
28