]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-int-unchecked.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / consts / const-int-unchecked.stderr
1 error: any use of this value will cause an error
2 --> $DIR/const-int-unchecked.rs:15:29
3 |
4 LL | const SHL_U8: u8 = unsafe { intrinsics::unchecked_shl(5_u8, 8) };
5 | ----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
6 | |
7 | overflowing shift by 8 in `unchecked_shl`
8 |
9 = note: `#[deny(const_err)]` on by default
10
11 error: any use of this value will cause an error
12 --> $DIR/const-int-unchecked.rs:17:31
13 |
14 LL | const SHL_U16: u16 = unsafe { intrinsics::unchecked_shl(5_u16, 16) };
15 | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
16 | |
17 | overflowing shift by 16 in `unchecked_shl`
18
19 error: any use of this value will cause an error
20 --> $DIR/const-int-unchecked.rs:19:31
21 |
22 LL | const SHL_U32: u32 = unsafe { intrinsics::unchecked_shl(5_u32, 32) };
23 | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
24 | |
25 | overflowing shift by 32 in `unchecked_shl`
26
27 error: any use of this value will cause an error
28 --> $DIR/const-int-unchecked.rs:21:31
29 |
30 LL | const SHL_U64: u64 = unsafe { intrinsics::unchecked_shl(5_u64, 64) };
31 | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
32 | |
33 | overflowing shift by 64 in `unchecked_shl`
34
35 error: any use of this value will cause an error
36 --> $DIR/const-int-unchecked.rs:23:33
37 |
38 LL | const SHL_U128: u128 = unsafe { intrinsics::unchecked_shl(5_u128, 128) };
39 | --------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
40 | |
41 | overflowing shift by 128 in `unchecked_shl`
42
43 error: any use of this value will cause an error
44 --> $DIR/const-int-unchecked.rs:28:29
45 |
46 LL | const SHL_I8: i8 = unsafe { intrinsics::unchecked_shl(5_i8, 8) };
47 | ----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
48 | |
49 | overflowing shift by 8 in `unchecked_shl`
50
51 error: any use of this value will cause an error
52 --> $DIR/const-int-unchecked.rs:30:31
53 |
54 LL | const SHL_I16: i16 = unsafe { intrinsics::unchecked_shl(5_16, 16) };
55 | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
56 | |
57 | overflowing shift by 16 in `unchecked_shl`
58
59 error: any use of this value will cause an error
60 --> $DIR/const-int-unchecked.rs:32:31
61 |
62 LL | const SHL_I32: i32 = unsafe { intrinsics::unchecked_shl(5_i32, 32) };
63 | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
64 | |
65 | overflowing shift by 32 in `unchecked_shl`
66
67 error: any use of this value will cause an error
68 --> $DIR/const-int-unchecked.rs:34:31
69 |
70 LL | const SHL_I64: i64 = unsafe { intrinsics::unchecked_shl(5_i64, 64) };
71 | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
72 | |
73 | overflowing shift by 64 in `unchecked_shl`
74
75 error: any use of this value will cause an error
76 --> $DIR/const-int-unchecked.rs:36:33
77 |
78 LL | const SHL_I128: i128 = unsafe { intrinsics::unchecked_shl(5_i128, 128) };
79 | --------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
80 | |
81 | overflowing shift by 128 in `unchecked_shl`
82
83 error: any use of this value will cause an error
84 --> $DIR/const-int-unchecked.rs:41:33
85 |
86 LL | const SHL_I8_NEG: i8 = unsafe { intrinsics::unchecked_shl(5_i8, -1) };
87 | --------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
88 | |
89 | overflowing shift by 255 in `unchecked_shl`
90
91 error: any use of this value will cause an error
92 --> $DIR/const-int-unchecked.rs:43:35
93 |
94 LL | const SHL_I16_NEG: i16 = unsafe { intrinsics::unchecked_shl(5_16, -1) };
95 | ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
96 | |
97 | overflowing shift by 65535 in `unchecked_shl`
98
99 error: any use of this value will cause an error
100 --> $DIR/const-int-unchecked.rs:45:35
101 |
102 LL | const SHL_I32_NEG: i32 = unsafe { intrinsics::unchecked_shl(5_i32, -1) };
103 | ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
104 | |
105 | overflowing shift by 4294967295 in `unchecked_shl`
106
107 error: any use of this value will cause an error
108 --> $DIR/const-int-unchecked.rs:47:35
109 |
110 LL | const SHL_I64_NEG: i64 = unsafe { intrinsics::unchecked_shl(5_i64, -1) };
111 | ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
112 | |
113 | overflowing shift by 18446744073709551615 in `unchecked_shl`
114
115 error: any use of this value will cause an error
116 --> $DIR/const-int-unchecked.rs:49:37
117 |
118 LL | const SHL_I128_NEG: i128 = unsafe { intrinsics::unchecked_shl(5_i128, -1) };
119 | ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
120 | |
121 | overflowing shift by 340282366920938463463374607431768211455 in `unchecked_shl`
122
123 error: any use of this value will cause an error
124 --> $DIR/const-int-unchecked.rs:55:40
125 |
126 LL | const SHL_I8_NEG_RANDOM: i8 = unsafe { intrinsics::unchecked_shl(5_i8, -6) };
127 | ---------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
128 | |
129 | overflowing shift by 250 in `unchecked_shl`
130
131 error: any use of this value will cause an error
132 --> $DIR/const-int-unchecked.rs:57:42
133 |
134 LL | const SHL_I16_NEG_RANDOM: i16 = unsafe { intrinsics::unchecked_shl(5_16, -13) };
135 | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
136 | |
137 | overflowing shift by 65523 in `unchecked_shl`
138
139 error: any use of this value will cause an error
140 --> $DIR/const-int-unchecked.rs:59:42
141 |
142 LL | const SHL_I32_NEG_RANDOM: i32 = unsafe { intrinsics::unchecked_shl(5_i32, -25) };
143 | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
144 | |
145 | overflowing shift by 4294967271 in `unchecked_shl`
146
147 error: any use of this value will cause an error
148 --> $DIR/const-int-unchecked.rs:61:42
149 |
150 LL | const SHL_I64_NEG_RANDOM: i64 = unsafe { intrinsics::unchecked_shl(5_i64, -30) };
151 | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
152 | |
153 | overflowing shift by 18446744073709551586 in `unchecked_shl`
154
155 error: any use of this value will cause an error
156 --> $DIR/const-int-unchecked.rs:63:44
157 |
158 LL | const SHL_I128_NEG_RANDOM: i128 = unsafe { intrinsics::unchecked_shl(5_i128, -93) };
159 | -------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
160 | |
161 | overflowing shift by 340282366920938463463374607431768211363 in `unchecked_shl`
162
163 error: any use of this value will cause an error
164 --> $DIR/const-int-unchecked.rs:70:29
165 |
166 LL | const SHR_U8: u8 = unsafe { intrinsics::unchecked_shr(5_u8, 8) };
167 | ----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
168 | |
169 | overflowing shift by 8 in `unchecked_shr`
170
171 error: any use of this value will cause an error
172 --> $DIR/const-int-unchecked.rs:72:31
173 |
174 LL | const SHR_U16: u16 = unsafe { intrinsics::unchecked_shr(5_u16, 16) };
175 | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
176 | |
177 | overflowing shift by 16 in `unchecked_shr`
178
179 error: any use of this value will cause an error
180 --> $DIR/const-int-unchecked.rs:74:31
181 |
182 LL | const SHR_U32: u32 = unsafe { intrinsics::unchecked_shr(5_u32, 32) };
183 | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
184 | |
185 | overflowing shift by 32 in `unchecked_shr`
186
187 error: any use of this value will cause an error
188 --> $DIR/const-int-unchecked.rs:76:31
189 |
190 LL | const SHR_U64: u64 = unsafe { intrinsics::unchecked_shr(5_u64, 64) };
191 | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
192 | |
193 | overflowing shift by 64 in `unchecked_shr`
194
195 error: any use of this value will cause an error
196 --> $DIR/const-int-unchecked.rs:78:33
197 |
198 LL | const SHR_U128: u128 = unsafe { intrinsics::unchecked_shr(5_u128, 128) };
199 | --------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
200 | |
201 | overflowing shift by 128 in `unchecked_shr`
202
203 error: any use of this value will cause an error
204 --> $DIR/const-int-unchecked.rs:83:29
205 |
206 LL | const SHR_I8: i8 = unsafe { intrinsics::unchecked_shr(5_i8, 8) };
207 | ----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
208 | |
209 | overflowing shift by 8 in `unchecked_shr`
210
211 error: any use of this value will cause an error
212 --> $DIR/const-int-unchecked.rs:85:31
213 |
214 LL | const SHR_I16: i16 = unsafe { intrinsics::unchecked_shr(5_16, 16) };
215 | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
216 | |
217 | overflowing shift by 16 in `unchecked_shr`
218
219 error: any use of this value will cause an error
220 --> $DIR/const-int-unchecked.rs:87:31
221 |
222 LL | const SHR_I32: i32 = unsafe { intrinsics::unchecked_shr(5_i32, 32) };
223 | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
224 | |
225 | overflowing shift by 32 in `unchecked_shr`
226
227 error: any use of this value will cause an error
228 --> $DIR/const-int-unchecked.rs:89:31
229 |
230 LL | const SHR_I64: i64 = unsafe { intrinsics::unchecked_shr(5_i64, 64) };
231 | ------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
232 | |
233 | overflowing shift by 64 in `unchecked_shr`
234
235 error: any use of this value will cause an error
236 --> $DIR/const-int-unchecked.rs:91:33
237 |
238 LL | const SHR_I128: i128 = unsafe { intrinsics::unchecked_shr(5_i128, 128) };
239 | --------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
240 | |
241 | overflowing shift by 128 in `unchecked_shr`
242
243 error: any use of this value will cause an error
244 --> $DIR/const-int-unchecked.rs:96:33
245 |
246 LL | const SHR_I8_NEG: i8 = unsafe { intrinsics::unchecked_shr(5_i8, -1) };
247 | --------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
248 | |
249 | overflowing shift by 255 in `unchecked_shr`
250
251 error: any use of this value will cause an error
252 --> $DIR/const-int-unchecked.rs:98:35
253 |
254 LL | const SHR_I16_NEG: i16 = unsafe { intrinsics::unchecked_shr(5_16, -1) };
255 | ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
256 | |
257 | overflowing shift by 65535 in `unchecked_shr`
258
259 error: any use of this value will cause an error
260 --> $DIR/const-int-unchecked.rs:100:35
261 |
262 LL | const SHR_I32_NEG: i32 = unsafe { intrinsics::unchecked_shr(5_i32, -1) };
263 | ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
264 | |
265 | overflowing shift by 4294967295 in `unchecked_shr`
266
267 error: any use of this value will cause an error
268 --> $DIR/const-int-unchecked.rs:102:35
269 |
270 LL | const SHR_I64_NEG: i64 = unsafe { intrinsics::unchecked_shr(5_i64, -1) };
271 | ----------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
272 | |
273 | overflowing shift by 18446744073709551615 in `unchecked_shr`
274
275 error: any use of this value will cause an error
276 --> $DIR/const-int-unchecked.rs:104:37
277 |
278 LL | const SHR_I128_NEG: i128 = unsafe { intrinsics::unchecked_shr(5_i128, -1) };
279 | ------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
280 | |
281 | overflowing shift by 340282366920938463463374607431768211455 in `unchecked_shr`
282
283 error: any use of this value will cause an error
284 --> $DIR/const-int-unchecked.rs:110:40
285 |
286 LL | const SHR_I8_NEG_RANDOM: i8 = unsafe { intrinsics::unchecked_shr(5_i8, -6) };
287 | ---------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
288 | |
289 | overflowing shift by 250 in `unchecked_shr`
290
291 error: any use of this value will cause an error
292 --> $DIR/const-int-unchecked.rs:112:42
293 |
294 LL | const SHR_I16_NEG_RANDOM: i16 = unsafe { intrinsics::unchecked_shr(5_16, -13) };
295 | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
296 | |
297 | overflowing shift by 65523 in `unchecked_shr`
298
299 error: any use of this value will cause an error
300 --> $DIR/const-int-unchecked.rs:114:42
301 |
302 LL | const SHR_I32_NEG_RANDOM: i32 = unsafe { intrinsics::unchecked_shr(5_i32, -25) };
303 | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
304 | |
305 | overflowing shift by 4294967271 in `unchecked_shr`
306
307 error: any use of this value will cause an error
308 --> $DIR/const-int-unchecked.rs:116:42
309 |
310 LL | const SHR_I64_NEG_RANDOM: i64 = unsafe { intrinsics::unchecked_shr(5_i64, -30) };
311 | -----------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
312 | |
313 | overflowing shift by 18446744073709551586 in `unchecked_shr`
314
315 error: any use of this value will cause an error
316 --> $DIR/const-int-unchecked.rs:118:44
317 |
318 LL | const SHR_I128_NEG_RANDOM: i128 = unsafe { intrinsics::unchecked_shr(5_i128, -93) };
319 | -------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
320 | |
321 | overflowing shift by 340282366920938463463374607431768211363 in `unchecked_shr`
322
323 error: any use of this value will cause an error
324 --> $DIR/const-int-unchecked.rs:123:25
325 |
326 LL | const _: u16 = unsafe { std::intrinsics::unchecked_add(40000u16, 30000) };
327 | ------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
328 | |
329 | overflow executing `unchecked_add`
330
331 error: any use of this value will cause an error
332 --> $DIR/const-int-unchecked.rs:126:25
333 |
334 LL | const _: u32 = unsafe { std::intrinsics::unchecked_sub(14u32, 22) };
335 | ------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
336 | |
337 | overflow executing `unchecked_sub`
338
339 error: any use of this value will cause an error
340 --> $DIR/const-int-unchecked.rs:129:25
341 |
342 LL | const _: u16 = unsafe { std::intrinsics::unchecked_mul(300u16, 250u16) };
343 | ------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
344 | |
345 | overflow executing `unchecked_mul`
346
347 error: any use of this value will cause an error
348 --> $DIR/const-int-unchecked.rs:132:25
349 |
350 LL | const _: i32 = unsafe { std::intrinsics::unchecked_div(1, 0) };
351 | ------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
352 | |
353 | dividing by zero
354
355 error: any use of this value will cause an error
356 --> $DIR/const-int-unchecked.rs:134:25
357 |
358 LL | const _: i32 = unsafe { std::intrinsics::unchecked_div(i32::min_value(), -1) };
359 | ------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
360 | |
361 | overflow executing `unchecked_div`
362
363 error: any use of this value will cause an error
364 --> $DIR/const-int-unchecked.rs:137:25
365 |
366 LL | const _: i32 = unsafe { std::intrinsics::unchecked_rem(1, 0) };
367 | ------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
368 | |
369 | calculating the remainder with a divisor of zero
370
371 error: any use of this value will cause an error
372 --> $DIR/const-int-unchecked.rs:139:25
373 |
374 LL | const _: i32 = unsafe { std::intrinsics::unchecked_rem(i32::min_value(), -1) };
375 | ------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^---
376 | |
377 | overflow executing `unchecked_rem`
378
379 error: aborting due to 47 previous errors
380