]> git.proxmox.com Git - rustc.git/blame - src/test/ui/lint/lint-type-overflow.stderr
New upstream version 1.64.0+dfsg1
[rustc.git] / src / test / ui / lint / lint-type-overflow.stderr
CommitLineData
48663c56
XL
1error: literal out of range for `u8`
2 --> $DIR/lint-type-overflow.rs:10:18
b7449926 3 |
532ac7d7 4LL | let x1: u8 = 256;
b7449926
XL
5 | ^^^
6 |
74b04a01 7note: the lint level is defined here
48663c56 8 --> $DIR/lint-type-overflow.rs:1:9
b7449926
XL
9 |
10LL | #![deny(overflowing_literals)]
11 | ^^^^^^^^^^^^^^^^^^^^
ba9703b0 12 = note: the literal `256` does not fit into the type `u8` whose range is `0..=255`
b7449926 13
48663c56
XL
14error: literal out of range for `u8`
15 --> $DIR/lint-type-overflow.rs:13:14
b7449926 16 |
532ac7d7 17LL | let x1 = 256_u8;
b7449926 18 | ^^^^^^
ba9703b0
XL
19 |
20 = note: the literal `256_u8` does not fit into the type `u8` whose range is `0..=255`
b7449926 21
48663c56
XL
22error: literal out of range for `i8`
23 --> $DIR/lint-type-overflow.rs:16:18
b7449926 24 |
532ac7d7 25LL | let x1: i8 = 128;
b7449926 26 | ^^^
ba9703b0
XL
27 |
28 = note: the literal `128` does not fit into the type `i8` whose range is `-128..=127`
6a06907d 29 = help: consider using the type `u8` instead
b7449926 30
48663c56
XL
31error: literal out of range for `i8`
32 --> $DIR/lint-type-overflow.rs:18:19
b7449926 33 |
532ac7d7 34LL | let x3: i8 = -129;
b7449926 35 | ^^^
ba9703b0
XL
36 |
37 = note: the literal `129` does not fit into the type `i8` whose range is `-128..=127`
6a06907d 38 = help: consider using the type `i16` instead
b7449926 39
48663c56
XL
40error: literal out of range for `i8`
41 --> $DIR/lint-type-overflow.rs:19:19
b7449926 42 |
532ac7d7 43LL | let x3: i8 = -(129);
b7449926 44 | ^^^^^
ba9703b0
XL
45 |
46 = note: the literal `129` does not fit into the type `i8` whose range is `-128..=127`
6a06907d 47 = help: consider using the type `i16` instead
b7449926 48
48663c56
XL
49error: literal out of range for `i8`
50 --> $DIR/lint-type-overflow.rs:20:20
b7449926 51 |
532ac7d7 52LL | let x3: i8 = -{129};
b7449926 53 | ^^^
ba9703b0
XL
54 |
55 = note: the literal `129` does not fit into the type `i8` whose range is `-128..=127`
6a06907d 56 = help: consider using the type `u8` instead
b7449926 57
48663c56
XL
58error: literal out of range for `i8`
59 --> $DIR/lint-type-overflow.rs:22:10
b7449926 60 |
532ac7d7 61LL | test(1000);
b7449926 62 | ^^^^
ba9703b0
XL
63 |
64 = note: the literal `1000` does not fit into the type `i8` whose range is `-128..=127`
6a06907d 65 = help: consider using the type `i16` instead
b7449926 66
48663c56
XL
67error: literal out of range for `i8`
68 --> $DIR/lint-type-overflow.rs:24:13
b7449926 69 |
532ac7d7 70LL | let x = 128_i8;
b7449926 71 | ^^^^^^
ba9703b0
XL
72 |
73 = note: the literal `128_i8` does not fit into the type `i8` whose range is `-128..=127`
6a06907d 74 = help: consider using the type `u8` instead
b7449926 75
48663c56
XL
76error: literal out of range for `i8`
77 --> $DIR/lint-type-overflow.rs:28:14
b7449926 78 |
532ac7d7 79LL | let x = -129_i8;
b7449926 80 | ^^^^^^
ba9703b0
XL
81 |
82 = note: the literal `129_i8` does not fit into the type `i8` whose range is `-128..=127`
6a06907d 83 = help: consider using the type `i16` instead
b7449926 84
48663c56
XL
85error: literal out of range for `i32`
86 --> $DIR/lint-type-overflow.rs:32:18
b7449926 87 |
532ac7d7 88LL | let x: i32 = 2147483648;
b7449926 89 | ^^^^^^^^^^
ba9703b0
XL
90 |
91 = note: the literal `2147483648` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
6a06907d 92 = help: consider using the type `u32` instead
b7449926 93
48663c56
XL
94error: literal out of range for `i32`
95 --> $DIR/lint-type-overflow.rs:33:13
b7449926 96 |
532ac7d7 97LL | let x = 2147483648_i32;
b7449926 98 | ^^^^^^^^^^^^^^
ba9703b0
XL
99 |
100 = note: the literal `2147483648_i32` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
6a06907d 101 = help: consider using the type `u32` instead
b7449926 102
48663c56
XL
103error: literal out of range for `i32`
104 --> $DIR/lint-type-overflow.rs:36:19
b7449926 105 |
532ac7d7 106LL | let x: i32 = -2147483649;
b7449926 107 | ^^^^^^^^^^
ba9703b0
XL
108 |
109 = note: the literal `2147483649` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
6a06907d 110 = help: consider using the type `i64` instead
b7449926 111
48663c56
XL
112error: literal out of range for `i32`
113 --> $DIR/lint-type-overflow.rs:37:14
b7449926 114 |
532ac7d7 115LL | let x = -2147483649_i32;
b7449926 116 | ^^^^^^^^^^^^^^
ba9703b0
XL
117 |
118 = note: the literal `2147483649_i32` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
6a06907d 119 = help: consider using the type `i64` instead
b7449926 120
48663c56
XL
121error: literal out of range for `i32`
122 --> $DIR/lint-type-overflow.rs:38:13
b7449926 123 |
532ac7d7 124LL | let x = 2147483648;
b7449926 125 | ^^^^^^^^^^
ba9703b0
XL
126 |
127 = note: the literal `2147483648` does not fit into the type `i32` whose range is `-2147483648..=2147483647`
6a06907d 128 = help: consider using the type `u32` instead
b7449926 129
48663c56
XL
130error: literal out of range for `i64`
131 --> $DIR/lint-type-overflow.rs:40:13
b7449926 132 |
532ac7d7 133LL | let x = 9223372036854775808_i64;
b7449926 134 | ^^^^^^^^^^^^^^^^^^^^^^^
ba9703b0
XL
135 |
136 = note: the literal `9223372036854775808_i64` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
6a06907d 137 = help: consider using the type `u64` instead
b7449926 138
48663c56
XL
139error: literal out of range for `i64`
140 --> $DIR/lint-type-overflow.rs:42:13
b7449926 141 |
532ac7d7 142LL | let x = 18446744073709551615_i64;
b7449926 143 | ^^^^^^^^^^^^^^^^^^^^^^^^
ba9703b0
XL
144 |
145 = note: the literal `18446744073709551615_i64` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
6a06907d 146 = help: consider using the type `u64` instead
b7449926 147
48663c56
XL
148error: literal out of range for `i64`
149 --> $DIR/lint-type-overflow.rs:43:19
b7449926 150 |
532ac7d7 151LL | let x: i64 = -9223372036854775809;
b7449926 152 | ^^^^^^^^^^^^^^^^^^^
ba9703b0
XL
153 |
154 = note: the literal `9223372036854775809` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
6a06907d 155 = help: consider using the type `i128` instead
b7449926 156
48663c56
XL
157error: literal out of range for `i64`
158 --> $DIR/lint-type-overflow.rs:44:14
b7449926 159 |
532ac7d7 160LL | let x = -9223372036854775809_i64;
b7449926 161 | ^^^^^^^^^^^^^^^^^^^^^^^
ba9703b0
XL
162 |
163 = note: the literal `9223372036854775809_i64` does not fit into the type `i64` whose range is `-9223372036854775808..=9223372036854775807`
6a06907d 164 = help: consider using the type `i128` instead
b7449926
XL
165
166error: aborting due to 18 previous errors
167