mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
41 lines
830 B
Text
41 lines
830 B
Text
error: range is out of bounds
|
|
--> $DIR/simple.rs:7:11
|
|
|
|
|
LL | &x[..=4];
|
|
| ^
|
|
|
|
|
= note: `-D clippy::out-of-bounds-indexing` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::out_of_bounds_indexing)]`
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/simple.rs:10:11
|
|
|
|
|
LL | &x[1..5];
|
|
| ^
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/simple.rs:12:8
|
|
|
|
|
LL | &x[5..];
|
|
| ^
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/simple.rs:14:10
|
|
|
|
|
LL | &x[..5];
|
|
| ^
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/simple.rs:16:8
|
|
|
|
|
LL | &x[5..].iter().map(|x| 2 * x).collect::<Vec<i32>>();
|
|
| ^
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/simple.rs:18:12
|
|
|
|
|
LL | &x[0..=4];
|
|
| ^
|
|
|
|
error: aborting due to 6 previous errors
|
|
|