2020-05-17 15:36:26 +00:00
|
|
|
error: this range is reversed and using it to index a slice will panic at run-time
|
2020-06-09 14:36:01 +00:00
|
|
|
--> $DIR/reversed_empty_ranges_unfixable.rs:8:18
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | let _ = &arr[3usize..=1usize];
|
|
|
|
| ^^^^^^^^^^^^^^^
|
2020-06-09 14:36:01 +00:00
|
|
|
|
|
|
|
|
= 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
|
|
|
|
|
|
|
error: this range is reversed and using it to index a slice will panic at run-time
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/reversed_empty_ranges_unfixable.rs:11:18
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | let _ = &arr[SOME_NUM..1];
|
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: this range is empty so it will yield no values
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/reversed_empty_ranges_unfixable.rs:14:14
|
2020-05-17 15:36:26 +00:00
|
|
|
|
|
|
|
|
LL | for _ in ANSWER..ANSWER {}
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
2020-06-09 14:36:01 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2020-05-17 15:36:26 +00:00
|
|
|
|