2019-06-06 12:23:17 -07:00
|
|
|
error: index out of bounds: the len is 3 but the index is 4
|
2019-12-14 04:28:32 +01:00
|
|
|
--> $DIR/array-literal-index-oob.rs:4:7
|
2019-06-06 12:23:17 -07:00
|
|
|
|
|
|
|
|
LL | &{[1, 2, 3][4]};
|
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
|
|
2019-07-16 22:17:38 +02:00
|
|
|
= note: `#[deny(const_err)]` on by default
|
2019-06-06 12:23:17 -07:00
|
|
|
|
|
|
|
error: reaching this expression at runtime will panic or abort
|
2019-12-14 04:28:32 +01:00
|
|
|
--> $DIR/array-literal-index-oob.rs:4:7
|
2019-06-06 12:23:17 -07:00
|
|
|
|
|
|
|
|
LL | &{[1, 2, 3][4]};
|
|
|
|
| --^^^^^^^^^^^^-
|
|
|
|
| |
|
2019-12-01 12:08:05 +01:00
|
|
|
| indexing out of bounds: the len is 3 but the index is 4
|
2019-06-06 12:23:17 -07:00
|
|
|
|
2019-11-22 17:26:09 -03:00
|
|
|
error[E0080]: erroneous constant used
|
|
|
|
--> $DIR/array-literal-index-oob.rs:4:5
|
|
|
|
|
|
|
|
|
LL | &{[1, 2, 3][4]};
|
|
|
|
| ^^^^^^^^^^^^^^^ referenced constant has errors
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2019-06-06 12:23:17 -07:00
|
|
|
|
2019-11-22 17:26:09 -03:00
|
|
|
For more information about this error, try `rustc --explain E0080`.
|