1 warning: literal out of range for `i8`
2 --> $DIR/type-overflow.rs:5:17
4 LL | let error = 255i8;
7 note: the lint level is defined here
8 --> $DIR/type-overflow.rs:2:9
10 LL | #![warn(overflowing_literals)]
11 | ^^^^^^^^^^^^^^^^^^^^
12 = note: the literal `255i8` does not fit into the type `i8` whose range is `-128..=127`
14 warning: literal out of range for i8
15 --> $DIR/type-overflow.rs:10:16
17 LL | let fail = 0b1000_0001i8;
18 | ^^^^^^^^^^^^^ help: consider using `u8` instead: `0b1000_0001u8`
20 = note: the literal `0b1000_0001i8` (decimal `129`) does not fit into the type `i8` and will become `-127i8`
22 warning: literal out of range for i64
23 --> $DIR/type-overflow.rs:12:16
25 LL | let fail = 0x8000_0000_0000_0000i64;
26 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `u64` instead: `0x8000_0000_0000_0000u64`
28 = note: the literal `0x8000_0000_0000_0000i64` (decimal `9223372036854775808`) does not fit into the type `i64` and will become `-9223372036854775808i64`
30 warning: literal out of range for u32
31 --> $DIR/type-overflow.rs:14:16
33 LL | let fail = 0x1_FFFF_FFFFu32;
34 | ^^^^^^^^^^^^^^^^ help: consider using `u64` instead: `0x1_FFFF_FFFFu64`
36 = note: the literal `0x1_FFFF_FFFFu32` (decimal `8589934591`) does not fit into the type `u32` and will become `4294967295u32`
38 warning: literal out of range for i128
39 --> $DIR/type-overflow.rs:16:22
41 LL | let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 = note: the literal `0x8000_0000_0000_0000_0000_0000_0000_0000` (decimal `170141183460469231731687303715884105728`) does not fit into the type `i128` and will become `-170141183460469231731687303715884105728i128`
45 = help: consider using `u128` instead
47 warning: literal out of range for i32
48 --> $DIR/type-overflow.rs:19:16
50 LL | let fail = 0x8FFF_FFFF_FFFF_FFFE;
51 | ^^^^^^^^^^^^^^^^^^^^^
53 = note: the literal `0x8FFF_FFFF_FFFF_FFFE` (decimal `10376293541461622782`) does not fit into the type `i32` and will become `-2i32`
54 = help: consider using `i128` instead
56 warning: literal out of range for i8
57 --> $DIR/type-overflow.rs:21:17
59 LL | let fail = -0b1111_1111i8;
60 | ^^^^^^^^^^^^^ help: consider using `i16` instead: `0b1111_1111i16`
62 = note: the literal `0b1111_1111i8` (decimal `255`) does not fit into the type `i8` and will become `-1i8`