2020-05-17 15:36:26 +00:00
|
|
|
error: this range is empty so it will yield no values
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/reversed_empty_ranges_fixable.rs:9:5
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | (42..=21).for_each(|x| println!("{}", x));
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::reversed-empty-ranges` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::reversed_empty_ranges)]`
|
2020-05-17 15:36:26 +00:00
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
|
|
|
|
LL | (21..=42).rev().for_each(|x| println!("{}", x));
|
2021-08-11 14:21:33 +00:00
|
|
|
| ~~~~~~~~~~~~~~~
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
error: this range is empty so it will yield no values
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/reversed_empty_ranges_fixable.rs:10:13
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (ANSWER..21).filter(|x| x % 2 == 0).take(10).collect::<Vec<_>>();
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
|
|
|
|
LL | let _ = (21..ANSWER).rev().filter(|x| x % 2 == 0).take(10).collect::<Vec<_>>();
|
2021-08-11 14:21:33 +00:00
|
|
|
| ~~~~~~~~~~~~~~~~~~
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
error: this range is empty so it will yield no values
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/reversed_empty_ranges_fixable.rs:12:14
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | for _ in -21..=-42 {}
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
|
|
|
|
LL | for _ in (-42..=-21).rev() {}
|
2021-08-11 14:21:33 +00:00
|
|
|
| ~~~~~~~~~~~~~~~~~
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
error: this range is empty so it will yield no values
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/reversed_empty_ranges_fixable.rs:13:14
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | for _ in 42u32..21u32 {}
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
|
|
|
|
LL | for _ in (21u32..42u32).rev() {}
|
2021-08-11 14:21:33 +00:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~
|
2020-05-17 15:36:26 +00:00
|
|
|
|
2020-06-09 14:36:01 +00:00
|
|
|
error: aborting due to 4 previous errors
|
2020-05-17 15:36:26 +00:00
|
|
|
|