1 error: literal out of range for `u8`
2 --> $DIR/lint-type-overflow.rs:10:18
7 = note: the literal `256` does not fit into the type `u8` whose range is `0..=255`
8 note: the lint level is defined here
9 --> $DIR/lint-type-overflow.rs:1:9
11 LL | #![deny(overflowing_literals)]
12 | ^^^^^^^^^^^^^^^^^^^^
14 error: literal out of range for `u8`
15 --> $DIR/lint-type-overflow.rs:13:14
20 = note: the literal `256_u8` does not fit into the type `u8` whose range is `0..=255`
22 error: literal out of range for `i8`
23 --> $DIR/lint-type-overflow.rs:16:18
25 LL | let x1: i8 = 128;
28 = note: the literal `128` does not fit into the type `i8` whose range is `-128..=127`
29 = help: consider using the type `u8` instead
31 error: literal out of range for `i8`
32 --> $DIR/lint-type-overflow.rs:18:19
34 LL | let x3: i8 = -129;
37 = note: the literal `129` does not fit into the type `i8` whose range is `-128..=127`
38 = help: consider using the type `i16` instead
40 error: literal out of range for `i8`
41 --> $DIR/lint-type-overflow.rs:19:19
43 LL | let x3: i8 = -(129);
46 = note: the literal `129` does not fit into the type `i8` whose range is `-128..=127`
47 = help: consider using the type `i16` instead
49 error: literal out of range for `i8`
50 --> $DIR/lint-type-overflow.rs:20:20
52 LL | let x3: i8 = -{129};
55 = note: the literal `129` does not fit into the type `i8` whose range is `-128..=127`
56 = help: consider using the type `u8` instead
58 error: literal out of range for `i8`
59 --> $DIR/lint-type-overflow.rs:22:10
64 = note: the literal `1000` does not fit into the type `i8` whose range is `-128..=127`
65 = help: consider using the type `i16` instead
67 error: literal out of range for `i8`
68 --> $DIR/lint-type-overflow.rs:24:13
73 = note: the literal `128_i8` does not fit into the type `i8` whose range is `-128..=127`
74 = help: consider using the type `u8` instead
76 error: literal out of range for `i8`
77 --> $DIR/lint-type-overflow.rs:28:14
82 = note: the literal `129_i8` does not fit into the type `i8` whose range is `-128..=127`
83 = help: consider using the type `i16` instead
85 error: literal out of range for `i32`
86 --> $DIR/lint-type-overflow.rs:32:18
88 LL | let x: i32 = 2147483648;
91 = note: the literal `2147483648` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
92 = help: consider using the type `u32` instead
94 error: literal out of range for `i32`
95 --> $DIR/lint-type-overflow.rs:33:13
97 LL | let x = 2147483648_i32;
100 = note: the literal `2147483648_i32` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
101 = help: consider using the type `u32` instead
103 error: literal out of range for `i32`
104 --> $DIR/lint-type-overflow.rs:36:19
106 LL | let x: i32 = -2147483649;
109 = note: the literal `2147483649` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
110 = help: consider using the type `i64` instead
112 error: literal out of range for `i32`
113 --> $DIR/lint-type-overflow.rs:37:14
115 LL | let x = -2147483649_i32;
118 = note: the literal `2147483649_i32` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
119 = help: consider using the type `i64` instead
121 error: literal out of range for `i32`
122 --> $DIR/lint-type-overflow.rs:38:13
124 LL | let x = 2147483648;
127 = note: the literal `2147483648` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
128 = help: consider using the type `u32` instead
130 error: literal out of range for `i64`
131 --> $DIR/lint-type-overflow.rs:40:13
133 LL | let x = 9223372036854775808_i64;
134 | ^^^^^^^^^^^^^^^^^^^^^^^
136 = note: the literal `9223372036854775808_i64` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
137 = help: consider using the type `u64` instead
139 error: literal out of range for `i64`
140 --> $DIR/lint-type-overflow.rs:42:13
142 LL | let x = 18446744073709551615_i64;
143 | ^^^^^^^^^^^^^^^^^^^^^^^^
145 = note: the literal `18446744073709551615_i64` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
146 = help: consider using the type `u64` instead
148 error: literal out of range for `i64`
149 --> $DIR/lint-type-overflow.rs:43:19
151 LL | let x: i64 = -9223372036854775809;
152 | ^^^^^^^^^^^^^^^^^^^
154 = note: the literal `9223372036854775809` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
155 = help: consider using the type `i128` instead
157 error: literal out of range for `i64`
158 --> $DIR/lint-type-overflow.rs:44:14
160 LL | let x = -9223372036854775809_i64;
161 | ^^^^^^^^^^^^^^^^^^^^^^^
163 = note: the literal `9223372036854775809_i64` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
164 = help: consider using the type `i128` instead
166 error: aborting due to 18 previous errors