summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/const-int-unchecked.stderr
blob: ad880d56d904d8eb1d7ac2165704839be9e9626f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:15:29
   |
LL | const SHL_U8: u8 = unsafe { intrinsics::unchecked_shl(5_u8, 8) };
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 8 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:17:31
   |
LL | const SHL_U16: u16 = unsafe { intrinsics::unchecked_shl(5_u16, 16) };
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 16 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:19:31
   |
LL | const SHL_U32: u32 = unsafe { intrinsics::unchecked_shl(5_u32, 32) };
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 32 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:21:31
   |
LL | const SHL_U64: u64 = unsafe { intrinsics::unchecked_shl(5_u64, 64) };
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 64 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:23:33
   |
LL | const SHL_U128: u128 = unsafe { intrinsics::unchecked_shl(5_u128, 128) };
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 128 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:28:29
   |
LL | const SHL_I8: i8 = unsafe { intrinsics::unchecked_shl(5_i8, 8) };
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 8 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:30:31
   |
LL | const SHL_I16: i16 = unsafe { intrinsics::unchecked_shl(5_16, 16) };
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 16 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:32:31
   |
LL | const SHL_I32: i32 = unsafe { intrinsics::unchecked_shl(5_i32, 32) };
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 32 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:34:31
   |
LL | const SHL_I64: i64 = unsafe { intrinsics::unchecked_shl(5_i64, 64) };
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 64 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:36:33
   |
LL | const SHL_I128: i128 = unsafe { intrinsics::unchecked_shl(5_i128, 128) };
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 128 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:41:33
   |
LL | const SHL_I8_NEG: i8 = unsafe { intrinsics::unchecked_shl(5_i8, -1) };
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 255 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:43:35
   |
LL | const SHL_I16_NEG: i16 = unsafe { intrinsics::unchecked_shl(5_16, -1) };
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 65535 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:45:35
   |
LL | const SHL_I32_NEG: i32 = unsafe { intrinsics::unchecked_shl(5_i32, -1) };
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 4294967295 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:47:35
   |
LL | const SHL_I64_NEG: i64 = unsafe { intrinsics::unchecked_shl(5_i64, -1) };
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 18446744073709551615 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:49:37
   |
LL | const SHL_I128_NEG: i128 = unsafe { intrinsics::unchecked_shl(5_i128, -1) };
   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 340282366920938463463374607431768211455 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:55:40
   |
LL | const SHL_I8_NEG_RANDOM: i8 = unsafe { intrinsics::unchecked_shl(5_i8, -6) };
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 250 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:57:42
   |
LL | const SHL_I16_NEG_RANDOM: i16 = unsafe { intrinsics::unchecked_shl(5_16, -13) };
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 65523 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:59:42
   |
LL | const SHL_I32_NEG_RANDOM: i32 = unsafe { intrinsics::unchecked_shl(5_i32, -25) };
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 4294967271 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:61:42
   |
LL | const SHL_I64_NEG_RANDOM: i64 = unsafe { intrinsics::unchecked_shl(5_i64, -30) };
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 18446744073709551586 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:63:44
   |
LL | const SHL_I128_NEG_RANDOM: i128 = unsafe { intrinsics::unchecked_shl(5_i128, -93) };
   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 340282366920938463463374607431768211363 in `unchecked_shl`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:70:29
   |
LL | const SHR_U8: u8 = unsafe { intrinsics::unchecked_shr(5_u8, 8) };
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 8 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:72:31
   |
LL | const SHR_U16: u16 = unsafe { intrinsics::unchecked_shr(5_u16, 16) };
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 16 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:74:31
   |
LL | const SHR_U32: u32 = unsafe { intrinsics::unchecked_shr(5_u32, 32) };
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 32 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:76:31
   |
LL | const SHR_U64: u64 = unsafe { intrinsics::unchecked_shr(5_u64, 64) };
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 64 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:78:33
   |
LL | const SHR_U128: u128 = unsafe { intrinsics::unchecked_shr(5_u128, 128) };
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 128 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:83:29
   |
LL | const SHR_I8: i8 = unsafe { intrinsics::unchecked_shr(5_i8, 8) };
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 8 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:85:31
   |
LL | const SHR_I16: i16 = unsafe { intrinsics::unchecked_shr(5_16, 16) };
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 16 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:87:31
   |
LL | const SHR_I32: i32 = unsafe { intrinsics::unchecked_shr(5_i32, 32) };
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 32 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:89:31
   |
LL | const SHR_I64: i64 = unsafe { intrinsics::unchecked_shr(5_i64, 64) };
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 64 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:91:33
   |
LL | const SHR_I128: i128 = unsafe { intrinsics::unchecked_shr(5_i128, 128) };
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 128 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:96:33
   |
LL | const SHR_I8_NEG: i8 = unsafe { intrinsics::unchecked_shr(5_i8, -1) };
   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 255 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:98:35
   |
LL | const SHR_I16_NEG: i16 = unsafe { intrinsics::unchecked_shr(5_16, -1) };
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 65535 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:100:35
   |
LL | const SHR_I32_NEG: i32 = unsafe { intrinsics::unchecked_shr(5_i32, -1) };
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 4294967295 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:102:35
   |
LL | const SHR_I64_NEG: i64 = unsafe { intrinsics::unchecked_shr(5_i64, -1) };
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 18446744073709551615 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:104:37
   |
LL | const SHR_I128_NEG: i128 = unsafe { intrinsics::unchecked_shr(5_i128, -1) };
   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 340282366920938463463374607431768211455 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:110:40
   |
LL | const SHR_I8_NEG_RANDOM: i8 = unsafe { intrinsics::unchecked_shr(5_i8, -6) };
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 250 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:112:42
   |
LL | const SHR_I16_NEG_RANDOM: i16 = unsafe { intrinsics::unchecked_shr(5_16, -13) };
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 65523 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:114:42
   |
LL | const SHR_I32_NEG_RANDOM: i32 = unsafe { intrinsics::unchecked_shr(5_i32, -25) };
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 4294967271 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:116:42
   |
LL | const SHR_I64_NEG_RANDOM: i64 = unsafe { intrinsics::unchecked_shr(5_i64, -30) };
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 18446744073709551586 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:118:44
   |
LL | const SHR_I128_NEG_RANDOM: i128 = unsafe { intrinsics::unchecked_shr(5_i128, -93) };
   |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflowing shift by 340282366920938463463374607431768211363 in `unchecked_shr`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:123:25
   |
LL | const _: u16 = unsafe { std::intrinsics::unchecked_add(40000u16, 30000) };
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_add`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:126:25
   |
LL | const _: u32 = unsafe { std::intrinsics::unchecked_sub(14u32, 22) };
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_sub`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:129:25
   |
LL | const _: u16 = unsafe { std::intrinsics::unchecked_mul(300u16, 250u16) };
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow executing `unchecked_mul`

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:132:25
   |
LL | const _: i32 = unsafe { std::intrinsics::unchecked_div(1, 0) };
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dividing by zero

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:134:25
   |
LL | const _: i32 = unsafe { std::intrinsics::unchecked_div(i32::MIN, -1) };
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow in signed division (dividing MIN by -1)

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:137:25
   |
LL | const _: i32 = unsafe { std::intrinsics::unchecked_rem(1, 0) };
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ calculating the remainder with a divisor of zero

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:139:25
   |
LL | const _: i32 = unsafe { std::intrinsics::unchecked_rem(i32::MIN, -1) };
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ overflow in signed remainder (dividing MIN by -1)

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:144:25
   |
LL | const _: u32 = unsafe { std::intrinsics::ctlz_nonzero(0) };
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ctlz_nonzero` called on 0

error[E0080]: evaluation of constant value failed
  --> $DIR/const-int-unchecked.rs:146:25
   |
LL | const _: u32 = unsafe { std::intrinsics::cttz_nonzero(0) };
   |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `cttz_nonzero` called on 0

error: aborting due to 49 previous errors

For more information about this error, try `rustc --explain E0080`.