blob: f23d4eb0f9ca4e12e68f31bb26f424be8c9b8859 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
error: this range is reversed and using it to index a slice will panic at run-time
--> $DIR/reversed_empty_ranges_unfixable.rs:8:18
|
LL | let _ = &arr[3usize..=1usize];
| ^^^^^^^^^^^^^^^
|
= note: `-D clippy::reversed-empty-ranges` implied by `-D warnings`
error: this range is reversed and using it to index a slice will panic at run-time
--> $DIR/reversed_empty_ranges_unfixable.rs:9:18
|
LL | let _ = &arr[SOME_NUM..1];
| ^^^^^^^^^^^
error: this range is empty so it will yield no values
--> $DIR/reversed_empty_ranges_unfixable.rs:11:14
|
LL | for _ in ANSWER..ANSWER {}
| ^^^^^^^^^^^^^^
error: aborting due to 3 previous errors
|