blob: f21cc97345c799e90b3d599e5267e5b314b4b3f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
pub const A: i8 = -i8::MIN;
//~^ ERROR constant
//~| NOTE attempt to negate `i8::MIN`, which would overflow
pub const B: i8 = A;
//~^ NOTE constant
pub const C: u8 = A as u8;
//~^ NOTE constant
pub const D: i8 = 50 - A;
//~^ NOTE constant
fn main() {
let _ = (A, B, C, D);
}
|