]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | error: this range is empty so it will yield no values |
2 | --> $DIR/reversed_empty_ranges_loops_fixable.rs:7:14 | |
3 | | | |
4 | LL | for i in 10..0 { | |
5 | | ^^^^^ | |
6 | | | |
7 | = note: `-D clippy::reversed-empty-ranges` implied by `-D warnings` | |
8 | help: consider using the following if you are attempting to iterate over this range in reverse | |
9 | | | |
10 | LL | for i in (0..10).rev() { | |
11 | | ^^^^^^^^^^^^^ | |
12 | ||
13 | error: this range is empty so it will yield no values | |
14 | --> $DIR/reversed_empty_ranges_loops_fixable.rs:11:14 | |
15 | | | |
16 | LL | for i in 10..=0 { | |
17 | | ^^^^^^ | |
18 | | | |
19 | help: consider using the following if you are attempting to iterate over this range in reverse | |
20 | | | |
21 | LL | for i in (0..=10).rev() { | |
22 | | ^^^^^^^^^^^^^^ | |
23 | ||
24 | error: this range is empty so it will yield no values | |
25 | --> $DIR/reversed_empty_ranges_loops_fixable.rs:15:14 | |
26 | | | |
27 | LL | for i in MAX_LEN..0 { | |
28 | | ^^^^^^^^^^ | |
29 | | | |
30 | help: consider using the following if you are attempting to iterate over this range in reverse | |
31 | | | |
32 | LL | for i in (0..MAX_LEN).rev() { | |
33 | | ^^^^^^^^^^^^^^^^^^ | |
34 | ||
35 | error: this range is empty so it will yield no values | |
36 | --> $DIR/reversed_empty_ranges_loops_fixable.rs:34:14 | |
37 | | | |
38 | LL | for i in (10..0).map(|x| x * 2) { | |
39 | | ^^^^^^^ | |
40 | | | |
41 | help: consider using the following if you are attempting to iterate over this range in reverse | |
42 | | | |
43 | LL | for i in (0..10).rev().map(|x| x * 2) { | |
44 | | ^^^^^^^^^^^^^ | |
45 | ||
46 | error: this range is empty so it will yield no values | |
47 | --> $DIR/reversed_empty_ranges_loops_fixable.rs:39:14 | |
48 | | | |
49 | LL | for i in 10..5 + 4 { | |
50 | | ^^^^^^^^^ | |
51 | | | |
52 | help: consider using the following if you are attempting to iterate over this range in reverse | |
53 | | | |
54 | LL | for i in (5 + 4..10).rev() { | |
55 | | ^^^^^^^^^^^^^^^^^ | |
56 | ||
57 | error: this range is empty so it will yield no values | |
58 | --> $DIR/reversed_empty_ranges_loops_fixable.rs:43:14 | |
59 | | | |
60 | LL | for i in (5 + 2)..(3 - 1) { | |
61 | | ^^^^^^^^^^^^^^^^ | |
62 | | | |
63 | help: consider using the following if you are attempting to iterate over this range in reverse | |
64 | | | |
65 | LL | for i in ((3 - 1)..(5 + 2)).rev() { | |
66 | | ^^^^^^^^^^^^^^^^^^^^^^^^ | |
67 | ||
68 | error: aborting due to 6 previous errors | |
69 |