]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/reversed_empty_ranges_fixable.stderr
Rollup merge of #101774 - Riolku:atomic-update-aba, r=m-ou-se
[rust.git] / src / tools / clippy / tests / ui / reversed_empty_ranges_fixable.stderr
1 error: this range is empty so it will yield no values
2   --> $DIR/reversed_empty_ranges_fixable.rs:10:5
3    |
4 LL |     (42..=21).for_each(|x| println!("{}", x));
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 |     (21..=42).rev().for_each(|x| println!("{}", x));
11    |     ~~~~~~~~~~~~~~~
12
13 error: this range is empty so it will yield no values
14   --> $DIR/reversed_empty_ranges_fixable.rs:11:13
15    |
16 LL |     let _ = (ANSWER..21).filter(|x| x % 2 == 0).take(10).collect::<Vec<_>>();
17    |             ^^^^^^^^^^^^
18    |
19 help: consider using the following if you are attempting to iterate over this range in reverse
20    |
21 LL |     let _ = (21..ANSWER).rev().filter(|x| x % 2 == 0).take(10).collect::<Vec<_>>();
22    |             ~~~~~~~~~~~~~~~~~~
23
24 error: this range is empty so it will yield no values
25   --> $DIR/reversed_empty_ranges_fixable.rs:13:14
26    |
27 LL |     for _ in -21..=-42 {}
28    |              ^^^^^^^^^
29    |
30 help: consider using the following if you are attempting to iterate over this range in reverse
31    |
32 LL |     for _ in (-42..=-21).rev() {}
33    |              ~~~~~~~~~~~~~~~~~
34
35 error: this range is empty so it will yield no values
36   --> $DIR/reversed_empty_ranges_fixable.rs:14:14
37    |
38 LL |     for _ in 42u32..21u32 {}
39    |              ^^^^^^^^^^^^
40    |
41 help: consider using the following if you are attempting to iterate over this range in reverse
42    |
43 LL |     for _ in (21u32..42u32).rev() {}
44    |              ~~~~~~~~~~~~~~~~~~~~
45
46 error: aborting due to 4 previous errors
47