1 #![deny(overflowing_literals)]
8 Ci8 = 223, //~ ERROR literal out of range for `i8`
15 Ci16 = 55555, //~ ERROR literal out of range for `i16`
21 Bi32 = -2_000_000_000,
22 Ci32 = 3_000_000_000, //~ ERROR literal out of range for `i32`
28 Bi64 = -9223372036854775808,
29 Ci64 = 9223372036854775809, //~ ERROR literal out of range for `i64`
32 // u64 currently allows negative numbers, and i64 allows numbers greater than `1<<63`. This is a
33 // little counterintuitive, but since the discriminant can store all the bits, and extracting it
34 // with a cast requires specifying the signedness, there is no loss of information in those cases.
35 // This also applies to isize and usize on 64-bit targets.