1 error: this constant cannot be used
2 --> $DIR/const-err-early.rs:13:1
4 LL | pub const A: i8 = -std::i8::MIN; //~ ERROR const_err
5 | ^^^^^^^^^^^^^^^^^^-------------^
7 | attempt to negate with overflow
9 note: lint level defined here
10 --> $DIR/const-err-early.rs:11:9
12 LL | #![deny(const_err)]
15 error: this constant cannot be used
16 --> $DIR/const-err-early.rs:14:1
18 LL | pub const B: u8 = 200u8 + 200u8; //~ ERROR const_err
19 | ^^^^^^^^^^^^^^^^^^-------------^
21 | attempt to add with overflow
23 error: this constant cannot be used
24 --> $DIR/const-err-early.rs:15:1
26 LL | pub const C: u8 = 200u8 * 4; //~ ERROR const_err
27 | ^^^^^^^^^^^^^^^^^^---------^
29 | attempt to multiply with overflow
31 error: this constant cannot be used
32 --> $DIR/const-err-early.rs:16:1
34 LL | pub const D: u8 = 42u8 - (42u8 + 1); //~ ERROR const_err
35 | ^^^^^^^^^^^^^^^^^^-----------------^
37 | attempt to subtract with overflow
39 error: this constant cannot be used
40 --> $DIR/const-err-early.rs:17:1
42 LL | pub const E: u8 = [5u8][1]; //~ ERROR const_err
43 | ^^^^^^^^^^^^^^^^^^--------^
45 | index out of bounds: the len is 1 but the index is 1
47 error: aborting due to 5 previous errors