153 lines
3.7 KiB
Plaintext
153 lines
3.7 KiB
Plaintext
error: const index is out of bounds
|
|
--> $DIR/array_indexing.rs:12:5
|
|
|
|
|
12 | x[4]; //~ERROR: const index is out of bounds
|
|
| ^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: const index is out of bounds
|
|
--> $DIR/array_indexing.rs:13:5
|
|
|
|
|
13 | x[1 << 3]; //~ERROR: const index is out of bounds
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/array_indexing.rs:14:6
|
|
|
|
|
14 | &x[1..5]; //~ERROR: range is out of bounds
|
|
| ^^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/array_indexing.rs:16:6
|
|
|
|
|
16 | &x[0...4]; //~ERROR: range is out of bounds
|
|
| ^^^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/array_indexing.rs:17:6
|
|
|
|
|
17 | &x[...4]; //~ERROR: range is out of bounds
|
|
| ^^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/array_indexing.rs:21:6
|
|
|
|
|
21 | &x[5..]; //~ERROR: range is out of bounds
|
|
| ^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/array_indexing.rs:23:6
|
|
|
|
|
23 | &x[..5]; //~ERROR: range is out of bounds
|
|
| ^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: indexing may panic
|
|
--> $DIR/array_indexing.rs:26:5
|
|
|
|
|
26 | y[0]; //~ERROR: indexing may panic
|
|
| ^^^^
|
|
|
|
|
note: lint level defined here
|
|
--> $DIR/array_indexing.rs:4:9
|
|
|
|
|
4 | #![deny(indexing_slicing)]
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error: slicing may panic
|
|
--> $DIR/array_indexing.rs:27:6
|
|
|
|
|
27 | &y[1..2]; //~ERROR: slicing may panic
|
|
| ^^^^^^^
|
|
|
|
error: slicing may panic
|
|
--> $DIR/array_indexing.rs:29:6
|
|
|
|
|
29 | &y[0...4]; //~ERROR: slicing may panic
|
|
| ^^^^^^^^
|
|
|
|
error: slicing may panic
|
|
--> $DIR/array_indexing.rs:30:6
|
|
|
|
|
30 | &y[...4]; //~ERROR: slicing may panic
|
|
| ^^^^^^^
|
|
|
|
error: const index is out of bounds
|
|
--> $DIR/array_indexing.rs:33:5
|
|
|
|
|
33 | empty[0]; //~ERROR: const index is out of bounds
|
|
| ^^^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/array_indexing.rs:34:6
|
|
|
|
|
34 | &empty[1..5]; //~ERROR: range is out of bounds
|
|
| ^^^^^^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/array_indexing.rs:35:6
|
|
|
|
|
35 | &empty[0...4]; //~ERROR: range is out of bounds
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/array_indexing.rs:36:6
|
|
|
|
|
36 | &empty[...4]; //~ERROR: range is out of bounds
|
|
| ^^^^^^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/array_indexing.rs:40:6
|
|
|
|
|
40 | &empty[0...0]; //~ERROR: range is out of bounds
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/array_indexing.rs:41:6
|
|
|
|
|
41 | &empty[...0]; //~ERROR: range is out of bounds
|
|
| ^^^^^^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/array_indexing.rs:43:6
|
|
|
|
|
43 | &empty[1..]; //~ERROR: range is out of bounds
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: range is out of bounds
|
|
--> $DIR/array_indexing.rs:44:6
|
|
|
|
|
44 | &empty[..4]; //~ERROR: range is out of bounds
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: #[deny(out_of_bounds_indexing)] on by default
|
|
|
|
error: aborting due to 19 previous errors
|
|
|