1 error[E0080]: evaluation of constant value failed
2 --> $DIR/const-err-early.rs:1:19
4 LL | pub const A: i8 = -i8::MIN;
5 | ^^^^^^^^ attempt to negate `i8::MIN`, which would overflow
7 error[E0080]: evaluation of constant value failed
8 --> $DIR/const-err-early.rs:2:19
10 LL | pub const B: u8 = 200u8 + 200u8;
11 | ^^^^^^^^^^^^^ attempt to compute `200_u8 + 200_u8`, which would overflow
13 error[E0080]: evaluation of constant value failed
14 --> $DIR/const-err-early.rs:3:19
16 LL | pub const C: u8 = 200u8 * 4;
17 | ^^^^^^^^^ attempt to compute `200_u8 * 4_u8`, which would overflow
19 error[E0080]: evaluation of constant value failed
20 --> $DIR/const-err-early.rs:4:19
22 LL | pub const D: u8 = 42u8 - (42u8 + 1);
23 | ^^^^^^^^^^^^^^^^^ attempt to compute `42_u8 - 43_u8`, which would overflow
25 error[E0080]: evaluation of constant value failed
26 --> $DIR/const-err-early.rs:5:19
28 LL | pub const E: u8 = [5u8][1];
29 | ^^^^^^^^ index out of bounds: the length is 1 but the index is 1
31 error: aborting due to 5 previous errors
33 For more information about this error, try `rustc --explain E0080`.