@@ -9,108 +9,143 @@ note: the lint level is defined here
99 |
1010LL | #![deny(overflowing_literals)]
1111 | ^^^^^^^^^^^^^^^^^^^^
12+ = note: the literal `256` does not fit into the type `u8` whose range is `0..=255`
1213
1314error: literal out of range for `u8`
1415 --> $DIR/lint-type-overflow.rs:13:14
1516 |
1617LL | let x1 = 256_u8;
1718 | ^^^^^^
19+ |
20+ = note: the literal `256_u8` does not fit into the type `u8` whose range is `0..=255`
1821
1922error: literal out of range for `i8`
2023 --> $DIR/lint-type-overflow.rs:16:18
2124 |
2225LL | let x1: i8 = 128;
2326 | ^^^
27+ |
28+ = note: the literal `128` does not fit into the type `i8` whose range is `-128..=127`
2429
2530error: literal out of range for `i8`
2631 --> $DIR/lint-type-overflow.rs:18:19
2732 |
2833LL | let x3: i8 = -129;
2934 | ^^^
35+ |
36+ = note: the literal `129` does not fit into the type `i8` whose range is `-128..=127`
3037
3138error: literal out of range for `i8`
3239 --> $DIR/lint-type-overflow.rs:19:19
3340 |
3441LL | let x3: i8 = -(129);
3542 | ^^^^^
43+ |
44+ = note: the literal `129` does not fit into the type `i8` whose range is `-128..=127`
3645
3746error: literal out of range for `i8`
3847 --> $DIR/lint-type-overflow.rs:20:20
3948 |
4049LL | let x3: i8 = -{129};
4150 | ^^^
51+ |
52+ = note: the literal `129` does not fit into the type `i8` whose range is `-128..=127`
4253
4354error: literal out of range for `i8`
4455 --> $DIR/lint-type-overflow.rs:22:10
4556 |
4657LL | test(1000);
4758 | ^^^^
59+ |
60+ = note: the literal `1000` does not fit into the type `i8` whose range is `-128..=127`
4861
4962error: literal out of range for `i8`
5063 --> $DIR/lint-type-overflow.rs:24:13
5164 |
5265LL | let x = 128_i8;
5366 | ^^^^^^
67+ |
68+ = note: the literal `128_i8` does not fit into the type `i8` whose range is `-128..=127`
5469
5570error: literal out of range for `i8`
5671 --> $DIR/lint-type-overflow.rs:28:14
5772 |
5873LL | let x = -129_i8;
5974 | ^^^^^^
75+ |
76+ = note: the literal `129_i8` does not fit into the type `i8` whose range is `-128..=127`
6077
6178error: literal out of range for `i32`
6279 --> $DIR/lint-type-overflow.rs:32:18
6380 |
6481LL | let x: i32 = 2147483648;
6582 | ^^^^^^^^^^
83+ |
84+ = note: the literal `2147483648` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
6685
6786error: literal out of range for `i32`
6887 --> $DIR/lint-type-overflow.rs:33:13
6988 |
7089LL | let x = 2147483648_i32;
7190 | ^^^^^^^^^^^^^^
91+ |
92+ = note: the literal `2147483648_i32` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
7293
7394error: literal out of range for `i32`
7495 --> $DIR/lint-type-overflow.rs:36:19
7596 |
7697LL | let x: i32 = -2147483649;
7798 | ^^^^^^^^^^
99+ |
100+ = note: the literal `2147483649` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
78101
79102error: literal out of range for `i32`
80103 --> $DIR/lint-type-overflow.rs:37:14
81104 |
82105LL | let x = -2147483649_i32;
83106 | ^^^^^^^^^^^^^^
107+ |
108+ = note: the literal `2147483649_i32` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
84109
85110error: literal out of range for `i32`
86111 --> $DIR/lint-type-overflow.rs:38:13
87112 |
88113LL | let x = 2147483648;
89114 | ^^^^^^^^^^
115+ |
116+ = note: the literal `2147483648` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
90117
91118error: literal out of range for `i64`
92119 --> $DIR/lint-type-overflow.rs:40:13
93120 |
94121LL | let x = 9223372036854775808_i64;
95122 | ^^^^^^^^^^^^^^^^^^^^^^^
123+ |
124+ = note: the literal `9223372036854775808_i64` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
96125
97126error: literal out of range for `i64`
98127 --> $DIR/lint-type-overflow.rs:42:13
99128 |
100129LL | let x = 18446744073709551615_i64;
101130 | ^^^^^^^^^^^^^^^^^^^^^^^^
131+ |
132+ = note: the literal `18446744073709551615_i64` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
102133
103134error: literal out of range for `i64`
104135 --> $DIR/lint-type-overflow.rs:43:19
105136 |
106137LL | let x: i64 = -9223372036854775809;
107138 | ^^^^^^^^^^^^^^^^^^^
139+ |
140+ = note: the literal `9223372036854775809` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
108141
109142error: literal out of range for `i64`
110143 --> $DIR/lint-type-overflow.rs:44:14
111144 |
112145LL | let x = -9223372036854775809_i64;
113146 | ^^^^^^^^^^^^^^^^^^^^^^^
147+ |
148+ = note: the literal `9223372036854775809_i64` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
114149
115150error: aborting due to 18 previous errors
116151
0 commit comments