2020-05-17 10:36:26 -05:00
|
|
|
error: this range is empty so it will yield no values
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/reversed_empty_ranges_loops_fixable.rs:7:14
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | for i in 10..0 {
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::reversed-empty-ranges` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::reversed_empty_ranges)]`
|
2020-05-17 10:36:26 -05:00
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
|
|
|
|
LL | for i in (0..10).rev() {
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: this range is empty so it will yield no values
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/reversed_empty_ranges_loops_fixable.rs:11:14
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | for i in 10..=0 {
|
|
|
|
| ^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
|
|
|
|
LL | for i in (0..=10).rev() {
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: this range is empty so it will yield no values
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/reversed_empty_ranges_loops_fixable.rs:15:14
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | for i in MAX_LEN..0 {
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
|
|
|
|
LL | for i in (0..MAX_LEN).rev() {
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: this range is empty so it will yield no values
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/reversed_empty_ranges_loops_fixable.rs:34:14
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | for i in (10..0).map(|x| x * 2) {
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
|
|
|
|
LL | for i in (0..10).rev().map(|x| x * 2) {
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: this range is empty so it will yield no values
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/reversed_empty_ranges_loops_fixable.rs:39:14
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | for i in 10..5 + 4 {
|
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
|
|
|
|
LL | for i in (5 + 4..10).rev() {
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: this range is empty so it will yield no values
|
2024-02-17 06:16:29 -06:00
|
|
|
--> tests/ui/reversed_empty_ranges_loops_fixable.rs:43:14
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
|
LL | for i in (5 + 2)..(3 - 1) {
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: consider using the following if you are attempting to iterate over this range in reverse
|
|
|
|
|
|
|
|
|
LL | for i in ((3 - 1)..(5 + 2)).rev() {
|
2021-08-11 09:21:33 -05:00
|
|
|
| ~~~~~~~~~~~~~~~~~~~~~~~~
|
2020-05-17 10:36:26 -05:00
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|