2018-08-26 13:19:34 +00:00
|
|
|
error: any use of this value will cause an error
|
2019-03-11 00:28:52 +00:00
|
|
|
--> $DIR/array_const_index-1.rs:2:16
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | const B: i32 = A[1];
|
2019-03-11 00:28:52 +00:00
|
|
|
| ---------------^^^^-
|
2018-08-08 12:28:26 +00:00
|
|
|
| |
|
2020-09-15 19:34:50 +00:00
|
|
|
| index out of bounds: the length is 0 but the index is 1
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-07-16 20:17:38 +00:00
|
|
|
= note: `#[deny(const_err)]` on by default
|
2021-01-30 13:49:22 +00:00
|
|
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
|
|
|
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2018-09-19 15:22:03 +00:00
|
|
|
error: aborting due to previous error
|
2018-08-08 12:28:26 +00:00
|
|
|
|