error: this constant cannot be used --> $DIR/const-err-multi.rs:13:1 | LL | pub const A: i8 = -std::i8::MIN; | ^^^^^^^^^^^^^^^^^^-------------^ | | | attempt to negate with overflow | note: lint level defined here --> $DIR/const-err-multi.rs:11:9 | LL | #![deny(const_err)] | ^^^^^^^^^ error: referenced constant has errors --> $DIR/const-err-multi.rs:15:1 | LL | pub const A: i8 = -std::i8::MIN; | ------------- attempt to negate with overflow LL | //~^ ERROR this constant cannot be used LL | pub const B: i8 = A; | ^^^^^^^^^^^^^^^^^^^^ error: this constant cannot be used --> $DIR/const-err-multi.rs:15:1 | LL | pub const B: i8 = A; | ^^^^^^^^^^^^^^^^^^-^ | | | referenced constant has errors error: referenced constant has errors --> $DIR/const-err-multi.rs:18:1 | LL | pub const A: i8 = -std::i8::MIN; | ------------- attempt to negate with overflow ... LL | pub const C: u8 = A as u8; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ error: this constant cannot be used --> $DIR/const-err-multi.rs:18:1 | LL | pub const C: u8 = A as u8; | ^^^^^^^^^^^^^^^^^^-------^ | | | referenced constant has errors error: referenced constant has errors --> $DIR/const-err-multi.rs:21:1 | LL | pub const A: i8 = -std::i8::MIN; | ------------- attempt to negate with overflow ... LL | pub const D: i8 = 50 - A; | ^^^^^^^^^^^^^^^^^^^^^^^^^ error: this constant cannot be used --> $DIR/const-err-multi.rs:21:1 | LL | pub const D: i8 = 50 - A; | ^^^^^^^^^^^^^^^^^^------^ | | | referenced constant has errors error: aborting due to 7 previous errors