rust-clippy/tests/ui/reversed_empty_ranges_unfixable.stderr

23 lines
728 B
Text
Raw Normal View History

2020-05-10 22:52:33 +00:00
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
2020-05-10 22:52:33 +00:00
|
LL | let _ = &arr[3usize..=1usize];
| ^^^^^^^^^^^^^^^
|
= note: `-D clippy::reversed-empty-ranges` implied by `-D warnings`
2020-05-10 22:52:33 +00:00
error: this range is reversed and using it to index a slice will panic at run-time
--> $DIR/reversed_empty_ranges_unfixable.rs:11:18
2020-05-10 22:52:33 +00:00
|
LL | let _ = &arr[SOME_NUM..1];
| ^^^^^^^^^^^
error: this range is empty so it will yield no values
--> $DIR/reversed_empty_ranges_unfixable.rs:14:14
2020-05-10 22:52:33 +00:00
|
LL | for _ in ANSWER..ANSWER {}
| ^^^^^^^^^^^^^^
error: aborting due to 3 previous errors
2020-05-10 22:52:33 +00:00