]>
Commit | Line | Data |
---|---|---|
2c00a5a8 | 1 | error[E0308]: mismatched types |
48663c56 | 2 | --> $DIR/numeric-cast.rs:23:18 |
2c00a5a8 | 3 | | |
0531ce1d | 4 | LL | foo::<usize>(x_u64); |
923072b8 FG |
5 | | ------------ ^^^^^ expected `usize`, found `u64` |
6 | | | | |
7 | | arguments to this function are incorrect | |
e74abb32 | 8 | | |
923072b8 FG |
9 | note: function defined here |
10 | --> $DIR/numeric-cast.rs:6:4 | |
11 | | | |
12 | LL | fn foo<N>(_x: N) {} | |
13 | | ^^^ ----- | |
29967ef6 | 14 | help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit |
48663c56 XL |
15 | | |
16 | LL | foo::<usize>(x_u64.try_into().unwrap()); | |
c295e0f8 | 17 | | ++++++++++++++++++++ |
2c00a5a8 XL |
18 | |
19 | error[E0308]: mismatched types | |
48663c56 | 20 | --> $DIR/numeric-cast.rs:25:18 |
2c00a5a8 | 21 | | |
0531ce1d | 22 | LL | foo::<usize>(x_u32); |
923072b8 FG |
23 | | ------------ ^^^^^ expected `usize`, found `u32` |
24 | | | | |
25 | | arguments to this function are incorrect | |
26 | | | |
27 | note: function defined here | |
28 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 29 | | |
923072b8 FG |
30 | LL | fn foo<N>(_x: N) {} |
31 | | ^^^ ----- | |
29967ef6 | 32 | help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit |
48663c56 XL |
33 | | |
34 | LL | foo::<usize>(x_u32.try_into().unwrap()); | |
c295e0f8 | 35 | | ++++++++++++++++++++ |
2c00a5a8 XL |
36 | |
37 | error[E0308]: mismatched types | |
48663c56 | 38 | --> $DIR/numeric-cast.rs:27:18 |
2c00a5a8 | 39 | | |
0531ce1d | 40 | LL | foo::<usize>(x_u16); |
923072b8 FG |
41 | | ------------ ^^^^^ expected `usize`, found `u16` |
42 | | | | |
43 | | arguments to this function are incorrect | |
c295e0f8 | 44 | | |
923072b8 FG |
45 | note: function defined here |
46 | --> $DIR/numeric-cast.rs:6:4 | |
47 | | | |
48 | LL | fn foo<N>(_x: N) {} | |
49 | | ^^^ ----- | |
c295e0f8 XL |
50 | help: you can convert a `u16` to a `usize` |
51 | | | |
52 | LL | foo::<usize>(x_u16.into()); | |
53 | | +++++++ | |
2c00a5a8 XL |
54 | |
55 | error[E0308]: mismatched types | |
48663c56 | 56 | --> $DIR/numeric-cast.rs:29:18 |
2c00a5a8 | 57 | | |
0531ce1d | 58 | LL | foo::<usize>(x_u8); |
923072b8 FG |
59 | | ------------ ^^^^ expected `usize`, found `u8` |
60 | | | | |
61 | | arguments to this function are incorrect | |
62 | | | |
63 | note: function defined here | |
64 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 65 | | |
923072b8 FG |
66 | LL | fn foo<N>(_x: N) {} |
67 | | ^^^ ----- | |
c295e0f8 XL |
68 | help: you can convert a `u8` to a `usize` |
69 | | | |
70 | LL | foo::<usize>(x_u8.into()); | |
71 | | +++++++ | |
2c00a5a8 XL |
72 | |
73 | error[E0308]: mismatched types | |
48663c56 | 74 | --> $DIR/numeric-cast.rs:31:18 |
2c00a5a8 | 75 | | |
0531ce1d | 76 | LL | foo::<usize>(x_isize); |
923072b8 FG |
77 | | ------------ ^^^^^^^ expected `usize`, found `isize` |
78 | | | | |
79 | | arguments to this function are incorrect | |
e74abb32 | 80 | | |
923072b8 FG |
81 | note: function defined here |
82 | --> $DIR/numeric-cast.rs:6:4 | |
83 | | | |
84 | LL | fn foo<N>(_x: N) {} | |
85 | | ^^^ ----- | |
29967ef6 | 86 | help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit |
48663c56 XL |
87 | | |
88 | LL | foo::<usize>(x_isize.try_into().unwrap()); | |
c295e0f8 | 89 | | ++++++++++++++++++++ |
2c00a5a8 XL |
90 | |
91 | error[E0308]: mismatched types | |
48663c56 | 92 | --> $DIR/numeric-cast.rs:33:18 |
2c00a5a8 | 93 | | |
0531ce1d | 94 | LL | foo::<usize>(x_i64); |
923072b8 FG |
95 | | ------------ ^^^^^ expected `usize`, found `i64` |
96 | | | | |
97 | | arguments to this function are incorrect | |
98 | | | |
99 | note: function defined here | |
100 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 101 | | |
923072b8 FG |
102 | LL | fn foo<N>(_x: N) {} |
103 | | ^^^ ----- | |
29967ef6 | 104 | help: you can convert an `i64` to a `usize` and panic if the converted value doesn't fit |
48663c56 XL |
105 | | |
106 | LL | foo::<usize>(x_i64.try_into().unwrap()); | |
c295e0f8 | 107 | | ++++++++++++++++++++ |
2c00a5a8 XL |
108 | |
109 | error[E0308]: mismatched types | |
48663c56 | 110 | --> $DIR/numeric-cast.rs:35:18 |
2c00a5a8 | 111 | | |
0531ce1d | 112 | LL | foo::<usize>(x_i32); |
923072b8 FG |
113 | | ------------ ^^^^^ expected `usize`, found `i32` |
114 | | | | |
115 | | arguments to this function are incorrect | |
e74abb32 | 116 | | |
923072b8 FG |
117 | note: function defined here |
118 | --> $DIR/numeric-cast.rs:6:4 | |
119 | | | |
120 | LL | fn foo<N>(_x: N) {} | |
121 | | ^^^ ----- | |
29967ef6 | 122 | help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit |
48663c56 XL |
123 | | |
124 | LL | foo::<usize>(x_i32.try_into().unwrap()); | |
c295e0f8 | 125 | | ++++++++++++++++++++ |
2c00a5a8 XL |
126 | |
127 | error[E0308]: mismatched types | |
48663c56 | 128 | --> $DIR/numeric-cast.rs:37:18 |
2c00a5a8 | 129 | | |
0531ce1d | 130 | LL | foo::<usize>(x_i16); |
923072b8 FG |
131 | | ------------ ^^^^^ expected `usize`, found `i16` |
132 | | | | |
133 | | arguments to this function are incorrect | |
134 | | | |
135 | note: function defined here | |
136 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 137 | | |
923072b8 FG |
138 | LL | fn foo<N>(_x: N) {} |
139 | | ^^^ ----- | |
29967ef6 | 140 | help: you can convert an `i16` to a `usize` and panic if the converted value doesn't fit |
48663c56 XL |
141 | | |
142 | LL | foo::<usize>(x_i16.try_into().unwrap()); | |
c295e0f8 | 143 | | ++++++++++++++++++++ |
2c00a5a8 XL |
144 | |
145 | error[E0308]: mismatched types | |
48663c56 | 146 | --> $DIR/numeric-cast.rs:39:18 |
2c00a5a8 | 147 | | |
0531ce1d | 148 | LL | foo::<usize>(x_i8); |
923072b8 FG |
149 | | ------------ ^^^^ expected `usize`, found `i8` |
150 | | | | |
151 | | arguments to this function are incorrect | |
e74abb32 | 152 | | |
923072b8 FG |
153 | note: function defined here |
154 | --> $DIR/numeric-cast.rs:6:4 | |
155 | | | |
156 | LL | fn foo<N>(_x: N) {} | |
157 | | ^^^ ----- | |
29967ef6 | 158 | help: you can convert an `i8` to a `usize` and panic if the converted value doesn't fit |
2c00a5a8 | 159 | | |
48663c56 | 160 | LL | foo::<usize>(x_i8.try_into().unwrap()); |
c295e0f8 | 161 | | ++++++++++++++++++++ |
2c00a5a8 XL |
162 | |
163 | error[E0308]: mismatched types | |
48663c56 | 164 | --> $DIR/numeric-cast.rs:44:18 |
2c00a5a8 | 165 | | |
0531ce1d | 166 | LL | foo::<isize>(x_usize); |
923072b8 FG |
167 | | ------------ ^^^^^^^ expected `isize`, found `usize` |
168 | | | | |
169 | | arguments to this function are incorrect | |
170 | | | |
171 | note: function defined here | |
172 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 173 | | |
923072b8 FG |
174 | LL | fn foo<N>(_x: N) {} |
175 | | ^^^ ----- | |
29967ef6 | 176 | help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit |
48663c56 XL |
177 | | |
178 | LL | foo::<isize>(x_usize.try_into().unwrap()); | |
c295e0f8 | 179 | | ++++++++++++++++++++ |
2c00a5a8 XL |
180 | |
181 | error[E0308]: mismatched types | |
48663c56 | 182 | --> $DIR/numeric-cast.rs:46:18 |
2c00a5a8 | 183 | | |
0531ce1d | 184 | LL | foo::<isize>(x_u64); |
923072b8 FG |
185 | | ------------ ^^^^^ expected `isize`, found `u64` |
186 | | | | |
187 | | arguments to this function are incorrect | |
e74abb32 | 188 | | |
923072b8 FG |
189 | note: function defined here |
190 | --> $DIR/numeric-cast.rs:6:4 | |
191 | | | |
192 | LL | fn foo<N>(_x: N) {} | |
193 | | ^^^ ----- | |
29967ef6 | 194 | help: you can convert a `u64` to an `isize` and panic if the converted value doesn't fit |
48663c56 XL |
195 | | |
196 | LL | foo::<isize>(x_u64.try_into().unwrap()); | |
c295e0f8 | 197 | | ++++++++++++++++++++ |
2c00a5a8 XL |
198 | |
199 | error[E0308]: mismatched types | |
48663c56 | 200 | --> $DIR/numeric-cast.rs:48:18 |
2c00a5a8 | 201 | | |
0531ce1d | 202 | LL | foo::<isize>(x_u32); |
923072b8 FG |
203 | | ------------ ^^^^^ expected `isize`, found `u32` |
204 | | | | |
205 | | arguments to this function are incorrect | |
206 | | | |
207 | note: function defined here | |
208 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 209 | | |
923072b8 FG |
210 | LL | fn foo<N>(_x: N) {} |
211 | | ^^^ ----- | |
29967ef6 | 212 | help: you can convert a `u32` to an `isize` and panic if the converted value doesn't fit |
48663c56 XL |
213 | | |
214 | LL | foo::<isize>(x_u32.try_into().unwrap()); | |
c295e0f8 | 215 | | ++++++++++++++++++++ |
2c00a5a8 XL |
216 | |
217 | error[E0308]: mismatched types | |
48663c56 | 218 | --> $DIR/numeric-cast.rs:50:18 |
2c00a5a8 | 219 | | |
0531ce1d | 220 | LL | foo::<isize>(x_u16); |
923072b8 FG |
221 | | ------------ ^^^^^ expected `isize`, found `u16` |
222 | | | | |
223 | | arguments to this function are incorrect | |
e74abb32 | 224 | | |
923072b8 FG |
225 | note: function defined here |
226 | --> $DIR/numeric-cast.rs:6:4 | |
227 | | | |
228 | LL | fn foo<N>(_x: N) {} | |
229 | | ^^^ ----- | |
29967ef6 | 230 | help: you can convert a `u16` to an `isize` and panic if the converted value doesn't fit |
48663c56 XL |
231 | | |
232 | LL | foo::<isize>(x_u16.try_into().unwrap()); | |
c295e0f8 | 233 | | ++++++++++++++++++++ |
2c00a5a8 XL |
234 | |
235 | error[E0308]: mismatched types | |
48663c56 | 236 | --> $DIR/numeric-cast.rs:52:18 |
2c00a5a8 | 237 | | |
0531ce1d | 238 | LL | foo::<isize>(x_u8); |
923072b8 FG |
239 | | ------------ ^^^^ expected `isize`, found `u8` |
240 | | | | |
241 | | arguments to this function are incorrect | |
242 | | | |
243 | note: function defined here | |
244 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 245 | | |
923072b8 FG |
246 | LL | fn foo<N>(_x: N) {} |
247 | | ^^^ ----- | |
c295e0f8 XL |
248 | help: you can convert a `u8` to an `isize` |
249 | | | |
250 | LL | foo::<isize>(x_u8.into()); | |
251 | | +++++++ | |
2c00a5a8 XL |
252 | |
253 | error[E0308]: mismatched types | |
48663c56 | 254 | --> $DIR/numeric-cast.rs:55:18 |
2c00a5a8 | 255 | | |
0531ce1d | 256 | LL | foo::<isize>(x_i64); |
923072b8 FG |
257 | | ------------ ^^^^^ expected `isize`, found `i64` |
258 | | | | |
259 | | arguments to this function are incorrect | |
260 | | | |
261 | note: function defined here | |
262 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 263 | | |
923072b8 FG |
264 | LL | fn foo<N>(_x: N) {} |
265 | | ^^^ ----- | |
29967ef6 | 266 | help: you can convert an `i64` to an `isize` and panic if the converted value doesn't fit |
48663c56 XL |
267 | | |
268 | LL | foo::<isize>(x_i64.try_into().unwrap()); | |
c295e0f8 | 269 | | ++++++++++++++++++++ |
2c00a5a8 XL |
270 | |
271 | error[E0308]: mismatched types | |
48663c56 | 272 | --> $DIR/numeric-cast.rs:57:18 |
2c00a5a8 | 273 | | |
0531ce1d | 274 | LL | foo::<isize>(x_i32); |
923072b8 FG |
275 | | ------------ ^^^^^ expected `isize`, found `i32` |
276 | | | | |
277 | | arguments to this function are incorrect | |
e74abb32 | 278 | | |
923072b8 FG |
279 | note: function defined here |
280 | --> $DIR/numeric-cast.rs:6:4 | |
281 | | | |
282 | LL | fn foo<N>(_x: N) {} | |
283 | | ^^^ ----- | |
29967ef6 | 284 | help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit |
48663c56 XL |
285 | | |
286 | LL | foo::<isize>(x_i32.try_into().unwrap()); | |
c295e0f8 | 287 | | ++++++++++++++++++++ |
2c00a5a8 XL |
288 | |
289 | error[E0308]: mismatched types | |
48663c56 | 290 | --> $DIR/numeric-cast.rs:59:18 |
2c00a5a8 | 291 | | |
0531ce1d | 292 | LL | foo::<isize>(x_i16); |
923072b8 FG |
293 | | ------------ ^^^^^ expected `isize`, found `i16` |
294 | | | | |
295 | | arguments to this function are incorrect | |
296 | | | |
297 | note: function defined here | |
298 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 299 | | |
923072b8 FG |
300 | LL | fn foo<N>(_x: N) {} |
301 | | ^^^ ----- | |
c295e0f8 XL |
302 | help: you can convert an `i16` to an `isize` |
303 | | | |
304 | LL | foo::<isize>(x_i16.into()); | |
305 | | +++++++ | |
2c00a5a8 XL |
306 | |
307 | error[E0308]: mismatched types | |
48663c56 | 308 | --> $DIR/numeric-cast.rs:61:18 |
2c00a5a8 | 309 | | |
0531ce1d | 310 | LL | foo::<isize>(x_i8); |
923072b8 FG |
311 | | ------------ ^^^^ expected `isize`, found `i8` |
312 | | | | |
313 | | arguments to this function are incorrect | |
c295e0f8 | 314 | | |
923072b8 FG |
315 | note: function defined here |
316 | --> $DIR/numeric-cast.rs:6:4 | |
317 | | | |
318 | LL | fn foo<N>(_x: N) {} | |
319 | | ^^^ ----- | |
c295e0f8 XL |
320 | help: you can convert an `i8` to an `isize` |
321 | | | |
322 | LL | foo::<isize>(x_i8.into()); | |
323 | | +++++++ | |
2c00a5a8 XL |
324 | |
325 | error[E0308]: mismatched types | |
48663c56 | 326 | --> $DIR/numeric-cast.rs:66:16 |
2c00a5a8 | 327 | | |
0531ce1d | 328 | LL | foo::<u64>(x_usize); |
923072b8 FG |
329 | | ---------- ^^^^^^^ expected `u64`, found `usize` |
330 | | | | |
331 | | arguments to this function are incorrect | |
332 | | | |
333 | note: function defined here | |
334 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 335 | | |
923072b8 FG |
336 | LL | fn foo<N>(_x: N) {} |
337 | | ^^^ ----- | |
29967ef6 | 338 | help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit |
48663c56 XL |
339 | | |
340 | LL | foo::<u64>(x_usize.try_into().unwrap()); | |
c295e0f8 | 341 | | ++++++++++++++++++++ |
2c00a5a8 XL |
342 | |
343 | error[E0308]: mismatched types | |
48663c56 | 344 | --> $DIR/numeric-cast.rs:69:16 |
2c00a5a8 | 345 | | |
0531ce1d | 346 | LL | foo::<u64>(x_u32); |
923072b8 FG |
347 | | ---------- ^^^^^ expected `u64`, found `u32` |
348 | | | | |
349 | | arguments to this function are incorrect | |
c295e0f8 | 350 | | |
923072b8 FG |
351 | note: function defined here |
352 | --> $DIR/numeric-cast.rs:6:4 | |
353 | | | |
354 | LL | fn foo<N>(_x: N) {} | |
355 | | ^^^ ----- | |
c295e0f8 XL |
356 | help: you can convert a `u32` to a `u64` |
357 | | | |
358 | LL | foo::<u64>(x_u32.into()); | |
359 | | +++++++ | |
2c00a5a8 XL |
360 | |
361 | error[E0308]: mismatched types | |
48663c56 | 362 | --> $DIR/numeric-cast.rs:71:16 |
2c00a5a8 | 363 | | |
0531ce1d | 364 | LL | foo::<u64>(x_u16); |
923072b8 FG |
365 | | ---------- ^^^^^ expected `u64`, found `u16` |
366 | | | | |
367 | | arguments to this function are incorrect | |
368 | | | |
369 | note: function defined here | |
370 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 371 | | |
923072b8 FG |
372 | LL | fn foo<N>(_x: N) {} |
373 | | ^^^ ----- | |
c295e0f8 XL |
374 | help: you can convert a `u16` to a `u64` |
375 | | | |
376 | LL | foo::<u64>(x_u16.into()); | |
377 | | +++++++ | |
2c00a5a8 XL |
378 | |
379 | error[E0308]: mismatched types | |
48663c56 | 380 | --> $DIR/numeric-cast.rs:73:16 |
2c00a5a8 | 381 | | |
0531ce1d | 382 | LL | foo::<u64>(x_u8); |
923072b8 FG |
383 | | ---------- ^^^^ expected `u64`, found `u8` |
384 | | | | |
385 | | arguments to this function are incorrect | |
386 | | | |
387 | note: function defined here | |
388 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 389 | | |
923072b8 FG |
390 | LL | fn foo<N>(_x: N) {} |
391 | | ^^^ ----- | |
c295e0f8 XL |
392 | help: you can convert a `u8` to a `u64` |
393 | | | |
394 | LL | foo::<u64>(x_u8.into()); | |
395 | | +++++++ | |
2c00a5a8 XL |
396 | |
397 | error[E0308]: mismatched types | |
48663c56 | 398 | --> $DIR/numeric-cast.rs:75:16 |
2c00a5a8 | 399 | | |
0531ce1d | 400 | LL | foo::<u64>(x_isize); |
923072b8 FG |
401 | | ---------- ^^^^^^^ expected `u64`, found `isize` |
402 | | | | |
403 | | arguments to this function are incorrect | |
e74abb32 | 404 | | |
923072b8 FG |
405 | note: function defined here |
406 | --> $DIR/numeric-cast.rs:6:4 | |
407 | | | |
408 | LL | fn foo<N>(_x: N) {} | |
409 | | ^^^ ----- | |
29967ef6 | 410 | help: you can convert an `isize` to a `u64` and panic if the converted value doesn't fit |
48663c56 XL |
411 | | |
412 | LL | foo::<u64>(x_isize.try_into().unwrap()); | |
c295e0f8 | 413 | | ++++++++++++++++++++ |
2c00a5a8 XL |
414 | |
415 | error[E0308]: mismatched types | |
48663c56 | 416 | --> $DIR/numeric-cast.rs:77:16 |
2c00a5a8 | 417 | | |
0531ce1d | 418 | LL | foo::<u64>(x_i64); |
923072b8 FG |
419 | | ---------- ^^^^^ expected `u64`, found `i64` |
420 | | | | |
421 | | arguments to this function are incorrect | |
422 | | | |
423 | note: function defined here | |
424 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 425 | | |
923072b8 FG |
426 | LL | fn foo<N>(_x: N) {} |
427 | | ^^^ ----- | |
29967ef6 | 428 | help: you can convert an `i64` to a `u64` and panic if the converted value doesn't fit |
48663c56 XL |
429 | | |
430 | LL | foo::<u64>(x_i64.try_into().unwrap()); | |
c295e0f8 | 431 | | ++++++++++++++++++++ |
2c00a5a8 XL |
432 | |
433 | error[E0308]: mismatched types | |
48663c56 | 434 | --> $DIR/numeric-cast.rs:79:16 |
2c00a5a8 | 435 | | |
0531ce1d | 436 | LL | foo::<u64>(x_i32); |
923072b8 FG |
437 | | ---------- ^^^^^ expected `u64`, found `i32` |
438 | | | | |
439 | | arguments to this function are incorrect | |
e74abb32 | 440 | | |
923072b8 FG |
441 | note: function defined here |
442 | --> $DIR/numeric-cast.rs:6:4 | |
443 | | | |
444 | LL | fn foo<N>(_x: N) {} | |
445 | | ^^^ ----- | |
29967ef6 | 446 | help: you can convert an `i32` to a `u64` and panic if the converted value doesn't fit |
48663c56 XL |
447 | | |
448 | LL | foo::<u64>(x_i32.try_into().unwrap()); | |
c295e0f8 | 449 | | ++++++++++++++++++++ |
2c00a5a8 XL |
450 | |
451 | error[E0308]: mismatched types | |
48663c56 | 452 | --> $DIR/numeric-cast.rs:81:16 |
2c00a5a8 | 453 | | |
0531ce1d | 454 | LL | foo::<u64>(x_i16); |
923072b8 FG |
455 | | ---------- ^^^^^ expected `u64`, found `i16` |
456 | | | | |
457 | | arguments to this function are incorrect | |
458 | | | |
459 | note: function defined here | |
460 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 461 | | |
923072b8 FG |
462 | LL | fn foo<N>(_x: N) {} |
463 | | ^^^ ----- | |
29967ef6 | 464 | help: you can convert an `i16` to a `u64` and panic if the converted value doesn't fit |
48663c56 XL |
465 | | |
466 | LL | foo::<u64>(x_i16.try_into().unwrap()); | |
c295e0f8 | 467 | | ++++++++++++++++++++ |
2c00a5a8 XL |
468 | |
469 | error[E0308]: mismatched types | |
48663c56 | 470 | --> $DIR/numeric-cast.rs:83:16 |
2c00a5a8 | 471 | | |
0531ce1d | 472 | LL | foo::<u64>(x_i8); |
923072b8 FG |
473 | | ---------- ^^^^ expected `u64`, found `i8` |
474 | | | | |
475 | | arguments to this function are incorrect | |
e74abb32 | 476 | | |
923072b8 FG |
477 | note: function defined here |
478 | --> $DIR/numeric-cast.rs:6:4 | |
479 | | | |
480 | LL | fn foo<N>(_x: N) {} | |
481 | | ^^^ ----- | |
29967ef6 | 482 | help: you can convert an `i8` to a `u64` and panic if the converted value doesn't fit |
2c00a5a8 | 483 | | |
48663c56 | 484 | LL | foo::<u64>(x_i8.try_into().unwrap()); |
c295e0f8 | 485 | | ++++++++++++++++++++ |
2c00a5a8 XL |
486 | |
487 | error[E0308]: mismatched types | |
48663c56 | 488 | --> $DIR/numeric-cast.rs:88:16 |
0531ce1d XL |
489 | | |
490 | LL | foo::<i64>(x_usize); | |
923072b8 FG |
491 | | ---------- ^^^^^^^ expected `i64`, found `usize` |
492 | | | | |
493 | | arguments to this function are incorrect | |
494 | | | |
495 | note: function defined here | |
496 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 497 | | |
923072b8 FG |
498 | LL | fn foo<N>(_x: N) {} |
499 | | ^^^ ----- | |
29967ef6 | 500 | help: you can convert a `usize` to an `i64` and panic if the converted value doesn't fit |
48663c56 XL |
501 | | |
502 | LL | foo::<i64>(x_usize.try_into().unwrap()); | |
c295e0f8 | 503 | | ++++++++++++++++++++ |
2c00a5a8 XL |
504 | |
505 | error[E0308]: mismatched types | |
48663c56 | 506 | --> $DIR/numeric-cast.rs:90:16 |
0531ce1d XL |
507 | | |
508 | LL | foo::<i64>(x_u64); | |
923072b8 FG |
509 | | ---------- ^^^^^ expected `i64`, found `u64` |
510 | | | | |
511 | | arguments to this function are incorrect | |
512 | | | |
513 | note: function defined here | |
514 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 515 | | |
923072b8 FG |
516 | LL | fn foo<N>(_x: N) {} |
517 | | ^^^ ----- | |
29967ef6 | 518 | help: you can convert a `u64` to an `i64` and panic if the converted value doesn't fit |
48663c56 XL |
519 | | |
520 | LL | foo::<i64>(x_u64.try_into().unwrap()); | |
c295e0f8 | 521 | | ++++++++++++++++++++ |
2c00a5a8 XL |
522 | |
523 | error[E0308]: mismatched types | |
48663c56 | 524 | --> $DIR/numeric-cast.rs:92:16 |
0531ce1d XL |
525 | | |
526 | LL | foo::<i64>(x_u32); | |
923072b8 FG |
527 | | ---------- ^^^^^ expected `i64`, found `u32` |
528 | | | | |
529 | | arguments to this function are incorrect | |
c295e0f8 | 530 | | |
923072b8 FG |
531 | note: function defined here |
532 | --> $DIR/numeric-cast.rs:6:4 | |
533 | | | |
534 | LL | fn foo<N>(_x: N) {} | |
535 | | ^^^ ----- | |
c295e0f8 XL |
536 | help: you can convert a `u32` to an `i64` |
537 | | | |
538 | LL | foo::<i64>(x_u32.into()); | |
539 | | +++++++ | |
2c00a5a8 XL |
540 | |
541 | error[E0308]: mismatched types | |
48663c56 | 542 | --> $DIR/numeric-cast.rs:94:16 |
0531ce1d XL |
543 | | |
544 | LL | foo::<i64>(x_u16); | |
923072b8 FG |
545 | | ---------- ^^^^^ expected `i64`, found `u16` |
546 | | | | |
547 | | arguments to this function are incorrect | |
548 | | | |
549 | note: function defined here | |
550 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 551 | | |
923072b8 FG |
552 | LL | fn foo<N>(_x: N) {} |
553 | | ^^^ ----- | |
c295e0f8 XL |
554 | help: you can convert a `u16` to an `i64` |
555 | | | |
556 | LL | foo::<i64>(x_u16.into()); | |
557 | | +++++++ | |
2c00a5a8 XL |
558 | |
559 | error[E0308]: mismatched types | |
48663c56 | 560 | --> $DIR/numeric-cast.rs:96:16 |
0531ce1d XL |
561 | | |
562 | LL | foo::<i64>(x_u8); | |
923072b8 FG |
563 | | ---------- ^^^^ expected `i64`, found `u8` |
564 | | | | |
565 | | arguments to this function are incorrect | |
c295e0f8 | 566 | | |
923072b8 FG |
567 | note: function defined here |
568 | --> $DIR/numeric-cast.rs:6:4 | |
569 | | | |
570 | LL | fn foo<N>(_x: N) {} | |
571 | | ^^^ ----- | |
c295e0f8 XL |
572 | help: you can convert a `u8` to an `i64` |
573 | | | |
574 | LL | foo::<i64>(x_u8.into()); | |
575 | | +++++++ | |
2c00a5a8 XL |
576 | |
577 | error[E0308]: mismatched types | |
48663c56 | 578 | --> $DIR/numeric-cast.rs:98:16 |
0531ce1d XL |
579 | | |
580 | LL | foo::<i64>(x_isize); | |
923072b8 FG |
581 | | ---------- ^^^^^^^ expected `i64`, found `isize` |
582 | | | | |
583 | | arguments to this function are incorrect | |
584 | | | |
585 | note: function defined here | |
586 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 587 | | |
923072b8 FG |
588 | LL | fn foo<N>(_x: N) {} |
589 | | ^^^ ----- | |
29967ef6 | 590 | help: you can convert an `isize` to an `i64` and panic if the converted value doesn't fit |
48663c56 XL |
591 | | |
592 | LL | foo::<i64>(x_isize.try_into().unwrap()); | |
c295e0f8 | 593 | | ++++++++++++++++++++ |
2c00a5a8 XL |
594 | |
595 | error[E0308]: mismatched types | |
48663c56 | 596 | --> $DIR/numeric-cast.rs:101:16 |
0531ce1d XL |
597 | | |
598 | LL | foo::<i64>(x_i32); | |
923072b8 FG |
599 | | ---------- ^^^^^ expected `i64`, found `i32` |
600 | | | | |
601 | | arguments to this function are incorrect | |
c295e0f8 | 602 | | |
923072b8 FG |
603 | note: function defined here |
604 | --> $DIR/numeric-cast.rs:6:4 | |
605 | | | |
606 | LL | fn foo<N>(_x: N) {} | |
607 | | ^^^ ----- | |
c295e0f8 XL |
608 | help: you can convert an `i32` to an `i64` |
609 | | | |
610 | LL | foo::<i64>(x_i32.into()); | |
611 | | +++++++ | |
2c00a5a8 XL |
612 | |
613 | error[E0308]: mismatched types | |
48663c56 | 614 | --> $DIR/numeric-cast.rs:103:16 |
0531ce1d XL |
615 | | |
616 | LL | foo::<i64>(x_i16); | |
923072b8 FG |
617 | | ---------- ^^^^^ expected `i64`, found `i16` |
618 | | | | |
619 | | arguments to this function are incorrect | |
620 | | | |
621 | note: function defined here | |
622 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 623 | | |
923072b8 FG |
624 | LL | fn foo<N>(_x: N) {} |
625 | | ^^^ ----- | |
c295e0f8 XL |
626 | help: you can convert an `i16` to an `i64` |
627 | | | |
628 | LL | foo::<i64>(x_i16.into()); | |
629 | | +++++++ | |
2c00a5a8 XL |
630 | |
631 | error[E0308]: mismatched types | |
48663c56 | 632 | --> $DIR/numeric-cast.rs:105:16 |
0531ce1d XL |
633 | | |
634 | LL | foo::<i64>(x_i8); | |
923072b8 FG |
635 | | ---------- ^^^^ expected `i64`, found `i8` |
636 | | | | |
637 | | arguments to this function are incorrect | |
638 | | | |
639 | note: function defined here | |
640 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 641 | | |
923072b8 FG |
642 | LL | fn foo<N>(_x: N) {} |
643 | | ^^^ ----- | |
c295e0f8 XL |
644 | help: you can convert an `i8` to an `i64` |
645 | | | |
646 | LL | foo::<i64>(x_i8.into()); | |
647 | | +++++++ | |
2c00a5a8 XL |
648 | |
649 | error[E0308]: mismatched types | |
0731742a | 650 | --> $DIR/numeric-cast.rs:110:16 |
0531ce1d | 651 | | |
0531ce1d | 652 | LL | foo::<u32>(x_usize); |
923072b8 FG |
653 | | ---------- ^^^^^^^ expected `u32`, found `usize` |
654 | | | | |
655 | | arguments to this function are incorrect | |
e74abb32 | 656 | | |
923072b8 FG |
657 | note: function defined here |
658 | --> $DIR/numeric-cast.rs:6:4 | |
659 | | | |
660 | LL | fn foo<N>(_x: N) {} | |
661 | | ^^^ ----- | |
29967ef6 | 662 | help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit |
48663c56 XL |
663 | | |
664 | LL | foo::<u32>(x_usize.try_into().unwrap()); | |
c295e0f8 | 665 | | ++++++++++++++++++++ |
2c00a5a8 XL |
666 | |
667 | error[E0308]: mismatched types | |
48663c56 | 668 | --> $DIR/numeric-cast.rs:112:16 |
0531ce1d XL |
669 | | |
670 | LL | foo::<u32>(x_u64); | |
923072b8 FG |
671 | | ---------- ^^^^^ expected `u32`, found `u64` |
672 | | | | |
673 | | arguments to this function are incorrect | |
674 | | | |
675 | note: function defined here | |
676 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 677 | | |
923072b8 FG |
678 | LL | fn foo<N>(_x: N) {} |
679 | | ^^^ ----- | |
29967ef6 | 680 | help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit |
48663c56 XL |
681 | | |
682 | LL | foo::<u32>(x_u64.try_into().unwrap()); | |
c295e0f8 | 683 | | ++++++++++++++++++++ |
2c00a5a8 XL |
684 | |
685 | error[E0308]: mismatched types | |
48663c56 | 686 | --> $DIR/numeric-cast.rs:115:16 |
0531ce1d XL |
687 | | |
688 | LL | foo::<u32>(x_u16); | |
923072b8 FG |
689 | | ---------- ^^^^^ expected `u32`, found `u16` |
690 | | | | |
691 | | arguments to this function are incorrect | |
c295e0f8 | 692 | | |
923072b8 FG |
693 | note: function defined here |
694 | --> $DIR/numeric-cast.rs:6:4 | |
695 | | | |
696 | LL | fn foo<N>(_x: N) {} | |
697 | | ^^^ ----- | |
c295e0f8 XL |
698 | help: you can convert a `u16` to a `u32` |
699 | | | |
700 | LL | foo::<u32>(x_u16.into()); | |
701 | | +++++++ | |
2c00a5a8 XL |
702 | |
703 | error[E0308]: mismatched types | |
48663c56 | 704 | --> $DIR/numeric-cast.rs:117:16 |
0531ce1d XL |
705 | | |
706 | LL | foo::<u32>(x_u8); | |
923072b8 FG |
707 | | ---------- ^^^^ expected `u32`, found `u8` |
708 | | | | |
709 | | arguments to this function are incorrect | |
710 | | | |
711 | note: function defined here | |
712 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 713 | | |
923072b8 FG |
714 | LL | fn foo<N>(_x: N) {} |
715 | | ^^^ ----- | |
c295e0f8 XL |
716 | help: you can convert a `u8` to a `u32` |
717 | | | |
718 | LL | foo::<u32>(x_u8.into()); | |
719 | | +++++++ | |
2c00a5a8 XL |
720 | |
721 | error[E0308]: mismatched types | |
48663c56 | 722 | --> $DIR/numeric-cast.rs:119:16 |
0531ce1d XL |
723 | | |
724 | LL | foo::<u32>(x_isize); | |
923072b8 FG |
725 | | ---------- ^^^^^^^ expected `u32`, found `isize` |
726 | | | | |
727 | | arguments to this function are incorrect | |
e74abb32 | 728 | | |
923072b8 FG |
729 | note: function defined here |
730 | --> $DIR/numeric-cast.rs:6:4 | |
731 | | | |
732 | LL | fn foo<N>(_x: N) {} | |
733 | | ^^^ ----- | |
29967ef6 | 734 | help: you can convert an `isize` to a `u32` and panic if the converted value doesn't fit |
48663c56 XL |
735 | | |
736 | LL | foo::<u32>(x_isize.try_into().unwrap()); | |
c295e0f8 | 737 | | ++++++++++++++++++++ |
2c00a5a8 XL |
738 | |
739 | error[E0308]: mismatched types | |
48663c56 | 740 | --> $DIR/numeric-cast.rs:121:16 |
0531ce1d XL |
741 | | |
742 | LL | foo::<u32>(x_i64); | |
923072b8 FG |
743 | | ---------- ^^^^^ expected `u32`, found `i64` |
744 | | | | |
745 | | arguments to this function are incorrect | |
746 | | | |
747 | note: function defined here | |
748 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 749 | | |
923072b8 FG |
750 | LL | fn foo<N>(_x: N) {} |
751 | | ^^^ ----- | |
29967ef6 | 752 | help: you can convert an `i64` to a `u32` and panic if the converted value doesn't fit |
48663c56 XL |
753 | | |
754 | LL | foo::<u32>(x_i64.try_into().unwrap()); | |
c295e0f8 | 755 | | ++++++++++++++++++++ |
2c00a5a8 XL |
756 | |
757 | error[E0308]: mismatched types | |
48663c56 | 758 | --> $DIR/numeric-cast.rs:123:16 |
0531ce1d XL |
759 | | |
760 | LL | foo::<u32>(x_i32); | |
923072b8 FG |
761 | | ---------- ^^^^^ expected `u32`, found `i32` |
762 | | | | |
763 | | arguments to this function are incorrect | |
764 | | | |
765 | note: function defined here | |
766 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 767 | | |
923072b8 FG |
768 | LL | fn foo<N>(_x: N) {} |
769 | | ^^^ ----- | |
29967ef6 | 770 | help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit |
48663c56 XL |
771 | | |
772 | LL | foo::<u32>(x_i32.try_into().unwrap()); | |
c295e0f8 | 773 | | ++++++++++++++++++++ |
2c00a5a8 XL |
774 | |
775 | error[E0308]: mismatched types | |
48663c56 | 776 | --> $DIR/numeric-cast.rs:125:16 |
0531ce1d XL |
777 | | |
778 | LL | foo::<u32>(x_i16); | |
923072b8 FG |
779 | | ---------- ^^^^^ expected `u32`, found `i16` |
780 | | | | |
781 | | arguments to this function are incorrect | |
e74abb32 | 782 | | |
923072b8 FG |
783 | note: function defined here |
784 | --> $DIR/numeric-cast.rs:6:4 | |
785 | | | |
786 | LL | fn foo<N>(_x: N) {} | |
787 | | ^^^ ----- | |
29967ef6 | 788 | help: you can convert an `i16` to a `u32` and panic if the converted value doesn't fit |
48663c56 XL |
789 | | |
790 | LL | foo::<u32>(x_i16.try_into().unwrap()); | |
c295e0f8 | 791 | | ++++++++++++++++++++ |
2c00a5a8 XL |
792 | |
793 | error[E0308]: mismatched types | |
48663c56 | 794 | --> $DIR/numeric-cast.rs:127:16 |
0531ce1d XL |
795 | | |
796 | LL | foo::<u32>(x_i8); | |
923072b8 FG |
797 | | ---------- ^^^^ expected `u32`, found `i8` |
798 | | | | |
799 | | arguments to this function are incorrect | |
800 | | | |
801 | note: function defined here | |
802 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 803 | | |
923072b8 FG |
804 | LL | fn foo<N>(_x: N) {} |
805 | | ^^^ ----- | |
29967ef6 | 806 | help: you can convert an `i8` to a `u32` and panic if the converted value doesn't fit |
0531ce1d | 807 | | |
48663c56 | 808 | LL | foo::<u32>(x_i8.try_into().unwrap()); |
c295e0f8 | 809 | | ++++++++++++++++++++ |
2c00a5a8 XL |
810 | |
811 | error[E0308]: mismatched types | |
48663c56 | 812 | --> $DIR/numeric-cast.rs:132:16 |
0531ce1d XL |
813 | | |
814 | LL | foo::<i32>(x_usize); | |
923072b8 FG |
815 | | ---------- ^^^^^^^ expected `i32`, found `usize` |
816 | | | | |
817 | | arguments to this function are incorrect | |
e74abb32 | 818 | | |
923072b8 FG |
819 | note: function defined here |
820 | --> $DIR/numeric-cast.rs:6:4 | |
821 | | | |
822 | LL | fn foo<N>(_x: N) {} | |
823 | | ^^^ ----- | |
29967ef6 | 824 | help: you can convert a `usize` to an `i32` and panic if the converted value doesn't fit |
48663c56 XL |
825 | | |
826 | LL | foo::<i32>(x_usize.try_into().unwrap()); | |
c295e0f8 | 827 | | ++++++++++++++++++++ |
2c00a5a8 XL |
828 | |
829 | error[E0308]: mismatched types | |
48663c56 | 830 | --> $DIR/numeric-cast.rs:134:16 |
0531ce1d XL |
831 | | |
832 | LL | foo::<i32>(x_u64); | |
923072b8 FG |
833 | | ---------- ^^^^^ expected `i32`, found `u64` |
834 | | | | |
835 | | arguments to this function are incorrect | |
836 | | | |
837 | note: function defined here | |
838 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 839 | | |
923072b8 FG |
840 | LL | fn foo<N>(_x: N) {} |
841 | | ^^^ ----- | |
29967ef6 | 842 | help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit |
48663c56 XL |
843 | | |
844 | LL | foo::<i32>(x_u64.try_into().unwrap()); | |
c295e0f8 | 845 | | ++++++++++++++++++++ |
2c00a5a8 XL |
846 | |
847 | error[E0308]: mismatched types | |
48663c56 | 848 | --> $DIR/numeric-cast.rs:136:16 |
0531ce1d XL |
849 | | |
850 | LL | foo::<i32>(x_u32); | |
923072b8 FG |
851 | | ---------- ^^^^^ expected `i32`, found `u32` |
852 | | | | |
853 | | arguments to this function are incorrect | |
e74abb32 | 854 | | |
923072b8 FG |
855 | note: function defined here |
856 | --> $DIR/numeric-cast.rs:6:4 | |
857 | | | |
858 | LL | fn foo<N>(_x: N) {} | |
859 | | ^^^ ----- | |
29967ef6 | 860 | help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit |
48663c56 XL |
861 | | |
862 | LL | foo::<i32>(x_u32.try_into().unwrap()); | |
c295e0f8 | 863 | | ++++++++++++++++++++ |
2c00a5a8 XL |
864 | |
865 | error[E0308]: mismatched types | |
48663c56 | 866 | --> $DIR/numeric-cast.rs:138:16 |
0531ce1d XL |
867 | | |
868 | LL | foo::<i32>(x_u16); | |
923072b8 FG |
869 | | ---------- ^^^^^ expected `i32`, found `u16` |
870 | | | | |
871 | | arguments to this function are incorrect | |
872 | | | |
873 | note: function defined here | |
874 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 875 | | |
923072b8 FG |
876 | LL | fn foo<N>(_x: N) {} |
877 | | ^^^ ----- | |
c295e0f8 XL |
878 | help: you can convert a `u16` to an `i32` |
879 | | | |
880 | LL | foo::<i32>(x_u16.into()); | |
881 | | +++++++ | |
2c00a5a8 XL |
882 | |
883 | error[E0308]: mismatched types | |
48663c56 | 884 | --> $DIR/numeric-cast.rs:140:16 |
0531ce1d XL |
885 | | |
886 | LL | foo::<i32>(x_u8); | |
923072b8 FG |
887 | | ---------- ^^^^ expected `i32`, found `u8` |
888 | | | | |
889 | | arguments to this function are incorrect | |
890 | | | |
891 | note: function defined here | |
892 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 893 | | |
923072b8 FG |
894 | LL | fn foo<N>(_x: N) {} |
895 | | ^^^ ----- | |
c295e0f8 XL |
896 | help: you can convert a `u8` to an `i32` |
897 | | | |
898 | LL | foo::<i32>(x_u8.into()); | |
899 | | +++++++ | |
2c00a5a8 XL |
900 | |
901 | error[E0308]: mismatched types | |
48663c56 | 902 | --> $DIR/numeric-cast.rs:142:16 |
0531ce1d XL |
903 | | |
904 | LL | foo::<i32>(x_isize); | |
923072b8 FG |
905 | | ---------- ^^^^^^^ expected `i32`, found `isize` |
906 | | | | |
907 | | arguments to this function are incorrect | |
e74abb32 | 908 | | |
923072b8 FG |
909 | note: function defined here |
910 | --> $DIR/numeric-cast.rs:6:4 | |
911 | | | |
912 | LL | fn foo<N>(_x: N) {} | |
913 | | ^^^ ----- | |
29967ef6 | 914 | help: you can convert an `isize` to an `i32` and panic if the converted value doesn't fit |
48663c56 XL |
915 | | |
916 | LL | foo::<i32>(x_isize.try_into().unwrap()); | |
c295e0f8 | 917 | | ++++++++++++++++++++ |
2c00a5a8 XL |
918 | |
919 | error[E0308]: mismatched types | |
48663c56 | 920 | --> $DIR/numeric-cast.rs:144:16 |
0531ce1d XL |
921 | | |
922 | LL | foo::<i32>(x_i64); | |
923072b8 FG |
923 | | ---------- ^^^^^ expected `i32`, found `i64` |
924 | | | | |
925 | | arguments to this function are incorrect | |
926 | | | |
927 | note: function defined here | |
928 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 929 | | |
923072b8 FG |
930 | LL | fn foo<N>(_x: N) {} |
931 | | ^^^ ----- | |
29967ef6 | 932 | help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit |
48663c56 XL |
933 | | |
934 | LL | foo::<i32>(x_i64.try_into().unwrap()); | |
c295e0f8 | 935 | | ++++++++++++++++++++ |
2c00a5a8 XL |
936 | |
937 | error[E0308]: mismatched types | |
48663c56 | 938 | --> $DIR/numeric-cast.rs:147:16 |
0531ce1d XL |
939 | | |
940 | LL | foo::<i32>(x_i16); | |
923072b8 FG |
941 | | ---------- ^^^^^ expected `i32`, found `i16` |
942 | | | | |
943 | | arguments to this function are incorrect | |
c295e0f8 | 944 | | |
923072b8 FG |
945 | note: function defined here |
946 | --> $DIR/numeric-cast.rs:6:4 | |
947 | | | |
948 | LL | fn foo<N>(_x: N) {} | |
949 | | ^^^ ----- | |
c295e0f8 XL |
950 | help: you can convert an `i16` to an `i32` |
951 | | | |
952 | LL | foo::<i32>(x_i16.into()); | |
953 | | +++++++ | |
2c00a5a8 XL |
954 | |
955 | error[E0308]: mismatched types | |
48663c56 | 956 | --> $DIR/numeric-cast.rs:149:16 |
0531ce1d XL |
957 | | |
958 | LL | foo::<i32>(x_i8); | |
923072b8 FG |
959 | | ---------- ^^^^ expected `i32`, found `i8` |
960 | | | | |
961 | | arguments to this function are incorrect | |
962 | | | |
963 | note: function defined here | |
964 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 965 | | |
923072b8 FG |
966 | LL | fn foo<N>(_x: N) {} |
967 | | ^^^ ----- | |
c295e0f8 XL |
968 | help: you can convert an `i8` to an `i32` |
969 | | | |
970 | LL | foo::<i32>(x_i8.into()); | |
971 | | +++++++ | |
2c00a5a8 XL |
972 | |
973 | error[E0308]: mismatched types | |
48663c56 | 974 | --> $DIR/numeric-cast.rs:154:16 |
0531ce1d XL |
975 | | |
976 | LL | foo::<u16>(x_usize); | |
923072b8 FG |
977 | | ---------- ^^^^^^^ expected `u16`, found `usize` |
978 | | | | |
979 | | arguments to this function are incorrect | |
e74abb32 | 980 | | |
923072b8 FG |
981 | note: function defined here |
982 | --> $DIR/numeric-cast.rs:6:4 | |
983 | | | |
984 | LL | fn foo<N>(_x: N) {} | |
985 | | ^^^ ----- | |
29967ef6 | 986 | help: you can convert a `usize` to a `u16` and panic if the converted value doesn't fit |
48663c56 XL |
987 | | |
988 | LL | foo::<u16>(x_usize.try_into().unwrap()); | |
c295e0f8 | 989 | | ++++++++++++++++++++ |
2c00a5a8 XL |
990 | |
991 | error[E0308]: mismatched types | |
48663c56 | 992 | --> $DIR/numeric-cast.rs:156:16 |
0531ce1d XL |
993 | | |
994 | LL | foo::<u16>(x_u64); | |
923072b8 FG |
995 | | ---------- ^^^^^ expected `u16`, found `u64` |
996 | | | | |
997 | | arguments to this function are incorrect | |
998 | | | |
999 | note: function defined here | |
1000 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1001 | | |
923072b8 FG |
1002 | LL | fn foo<N>(_x: N) {} |
1003 | | ^^^ ----- | |
29967ef6 | 1004 | help: you can convert a `u64` to a `u16` and panic if the converted value doesn't fit |
48663c56 XL |
1005 | | |
1006 | LL | foo::<u16>(x_u64.try_into().unwrap()); | |
c295e0f8 | 1007 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1008 | |
1009 | error[E0308]: mismatched types | |
48663c56 | 1010 | --> $DIR/numeric-cast.rs:158:16 |
0531ce1d XL |
1011 | | |
1012 | LL | foo::<u16>(x_u32); | |
923072b8 FG |
1013 | | ---------- ^^^^^ expected `u16`, found `u32` |
1014 | | | | |
1015 | | arguments to this function are incorrect | |
1016 | | | |
1017 | note: function defined here | |
1018 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1019 | | |
923072b8 FG |
1020 | LL | fn foo<N>(_x: N) {} |
1021 | | ^^^ ----- | |
29967ef6 | 1022 | help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit |
48663c56 XL |
1023 | | |
1024 | LL | foo::<u16>(x_u32.try_into().unwrap()); | |
c295e0f8 | 1025 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1026 | |
1027 | error[E0308]: mismatched types | |
48663c56 | 1028 | --> $DIR/numeric-cast.rs:161:16 |
0531ce1d XL |
1029 | | |
1030 | LL | foo::<u16>(x_u8); | |
923072b8 FG |
1031 | | ---------- ^^^^ expected `u16`, found `u8` |
1032 | | | | |
1033 | | arguments to this function are incorrect | |
c295e0f8 | 1034 | | |
923072b8 FG |
1035 | note: function defined here |
1036 | --> $DIR/numeric-cast.rs:6:4 | |
1037 | | | |
1038 | LL | fn foo<N>(_x: N) {} | |
1039 | | ^^^ ----- | |
c295e0f8 XL |
1040 | help: you can convert a `u8` to a `u16` |
1041 | | | |
1042 | LL | foo::<u16>(x_u8.into()); | |
1043 | | +++++++ | |
2c00a5a8 XL |
1044 | |
1045 | error[E0308]: mismatched types | |
48663c56 | 1046 | --> $DIR/numeric-cast.rs:163:16 |
0531ce1d XL |
1047 | | |
1048 | LL | foo::<u16>(x_isize); | |
923072b8 FG |
1049 | | ---------- ^^^^^^^ expected `u16`, found `isize` |
1050 | | | | |
1051 | | arguments to this function are incorrect | |
1052 | | | |
1053 | note: function defined here | |
1054 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1055 | | |
923072b8 FG |
1056 | LL | fn foo<N>(_x: N) {} |
1057 | | ^^^ ----- | |
29967ef6 | 1058 | help: you can convert an `isize` to a `u16` and panic if the converted value doesn't fit |
48663c56 XL |
1059 | | |
1060 | LL | foo::<u16>(x_isize.try_into().unwrap()); | |
c295e0f8 | 1061 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1062 | |
1063 | error[E0308]: mismatched types | |
48663c56 | 1064 | --> $DIR/numeric-cast.rs:165:16 |
0531ce1d XL |
1065 | | |
1066 | LL | foo::<u16>(x_i64); | |
923072b8 FG |
1067 | | ---------- ^^^^^ expected `u16`, found `i64` |
1068 | | | | |
1069 | | arguments to this function are incorrect | |
e74abb32 | 1070 | | |
923072b8 FG |
1071 | note: function defined here |
1072 | --> $DIR/numeric-cast.rs:6:4 | |
1073 | | | |
1074 | LL | fn foo<N>(_x: N) {} | |
1075 | | ^^^ ----- | |
29967ef6 | 1076 | help: you can convert an `i64` to a `u16` and panic if the converted value doesn't fit |
48663c56 XL |
1077 | | |
1078 | LL | foo::<u16>(x_i64.try_into().unwrap()); | |
c295e0f8 | 1079 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1080 | |
1081 | error[E0308]: mismatched types | |
48663c56 | 1082 | --> $DIR/numeric-cast.rs:167:16 |
0531ce1d XL |
1083 | | |
1084 | LL | foo::<u16>(x_i32); | |
923072b8 FG |
1085 | | ---------- ^^^^^ expected `u16`, found `i32` |
1086 | | | | |
1087 | | arguments to this function are incorrect | |
1088 | | | |
1089 | note: function defined here | |
1090 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1091 | | |
923072b8 FG |
1092 | LL | fn foo<N>(_x: N) {} |
1093 | | ^^^ ----- | |
29967ef6 | 1094 | help: you can convert an `i32` to a `u16` and panic if the converted value doesn't fit |
48663c56 XL |
1095 | | |
1096 | LL | foo::<u16>(x_i32.try_into().unwrap()); | |
c295e0f8 | 1097 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1098 | |
1099 | error[E0308]: mismatched types | |
48663c56 | 1100 | --> $DIR/numeric-cast.rs:169:16 |
0531ce1d XL |
1101 | | |
1102 | LL | foo::<u16>(x_i16); | |
923072b8 FG |
1103 | | ---------- ^^^^^ expected `u16`, found `i16` |
1104 | | | | |
1105 | | arguments to this function are incorrect | |
e74abb32 | 1106 | | |
923072b8 FG |
1107 | note: function defined here |
1108 | --> $DIR/numeric-cast.rs:6:4 | |
1109 | | | |
1110 | LL | fn foo<N>(_x: N) {} | |
1111 | | ^^^ ----- | |
29967ef6 | 1112 | help: you can convert an `i16` to a `u16` and panic if the converted value doesn't fit |
48663c56 XL |
1113 | | |
1114 | LL | foo::<u16>(x_i16.try_into().unwrap()); | |
c295e0f8 | 1115 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1116 | |
1117 | error[E0308]: mismatched types | |
48663c56 | 1118 | --> $DIR/numeric-cast.rs:171:16 |
0531ce1d XL |
1119 | | |
1120 | LL | foo::<u16>(x_i8); | |
923072b8 FG |
1121 | | ---------- ^^^^ expected `u16`, found `i8` |
1122 | | | | |
1123 | | arguments to this function are incorrect | |
1124 | | | |
1125 | note: function defined here | |
1126 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1127 | | |
923072b8 FG |
1128 | LL | fn foo<N>(_x: N) {} |
1129 | | ^^^ ----- | |
29967ef6 | 1130 | help: you can convert an `i8` to a `u16` and panic if the converted value doesn't fit |
0531ce1d | 1131 | | |
48663c56 | 1132 | LL | foo::<u16>(x_i8.try_into().unwrap()); |
c295e0f8 | 1133 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1134 | |
1135 | error[E0308]: mismatched types | |
48663c56 | 1136 | --> $DIR/numeric-cast.rs:176:16 |
0531ce1d XL |
1137 | | |
1138 | LL | foo::<i16>(x_usize); | |
923072b8 FG |
1139 | | ---------- ^^^^^^^ expected `i16`, found `usize` |
1140 | | | | |
1141 | | arguments to this function are incorrect | |
1142 | | | |
1143 | note: function defined here | |
1144 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1145 | | |
923072b8 FG |
1146 | LL | fn foo<N>(_x: N) {} |
1147 | | ^^^ ----- | |
29967ef6 | 1148 | help: you can convert a `usize` to an `i16` and panic if the converted value doesn't fit |
48663c56 XL |
1149 | | |
1150 | LL | foo::<i16>(x_usize.try_into().unwrap()); | |
c295e0f8 | 1151 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1152 | |
1153 | error[E0308]: mismatched types | |
48663c56 | 1154 | --> $DIR/numeric-cast.rs:178:16 |
0531ce1d XL |
1155 | | |
1156 | LL | foo::<i16>(x_u64); | |
923072b8 FG |
1157 | | ---------- ^^^^^ expected `i16`, found `u64` |
1158 | | | | |
1159 | | arguments to this function are incorrect | |
e74abb32 | 1160 | | |
923072b8 FG |
1161 | note: function defined here |
1162 | --> $DIR/numeric-cast.rs:6:4 | |
1163 | | | |
1164 | LL | fn foo<N>(_x: N) {} | |
1165 | | ^^^ ----- | |
29967ef6 | 1166 | help: you can convert a `u64` to an `i16` and panic if the converted value doesn't fit |
48663c56 XL |
1167 | | |
1168 | LL | foo::<i16>(x_u64.try_into().unwrap()); | |
c295e0f8 | 1169 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1170 | |
1171 | error[E0308]: mismatched types | |
48663c56 | 1172 | --> $DIR/numeric-cast.rs:180:16 |
0531ce1d XL |
1173 | | |
1174 | LL | foo::<i16>(x_u32); | |
923072b8 FG |
1175 | | ---------- ^^^^^ expected `i16`, found `u32` |
1176 | | | | |
1177 | | arguments to this function are incorrect | |
1178 | | | |
1179 | note: function defined here | |
1180 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1181 | | |
923072b8 FG |
1182 | LL | fn foo<N>(_x: N) {} |
1183 | | ^^^ ----- | |
29967ef6 | 1184 | help: you can convert a `u32` to an `i16` and panic if the converted value doesn't fit |
48663c56 XL |
1185 | | |
1186 | LL | foo::<i16>(x_u32.try_into().unwrap()); | |
c295e0f8 | 1187 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1188 | |
1189 | error[E0308]: mismatched types | |
48663c56 | 1190 | --> $DIR/numeric-cast.rs:182:16 |
0531ce1d XL |
1191 | | |
1192 | LL | foo::<i16>(x_u16); | |
923072b8 FG |
1193 | | ---------- ^^^^^ expected `i16`, found `u16` |
1194 | | | | |
1195 | | arguments to this function are incorrect | |
e74abb32 | 1196 | | |
923072b8 FG |
1197 | note: function defined here |
1198 | --> $DIR/numeric-cast.rs:6:4 | |
1199 | | | |
1200 | LL | fn foo<N>(_x: N) {} | |
1201 | | ^^^ ----- | |
29967ef6 | 1202 | help: you can convert a `u16` to an `i16` and panic if the converted value doesn't fit |
48663c56 XL |
1203 | | |
1204 | LL | foo::<i16>(x_u16.try_into().unwrap()); | |
c295e0f8 | 1205 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1206 | |
1207 | error[E0308]: mismatched types | |
48663c56 | 1208 | --> $DIR/numeric-cast.rs:184:16 |
0531ce1d XL |
1209 | | |
1210 | LL | foo::<i16>(x_u8); | |
923072b8 FG |
1211 | | ---------- ^^^^ expected `i16`, found `u8` |
1212 | | | | |
1213 | | arguments to this function are incorrect | |
1214 | | | |
1215 | note: function defined here | |
1216 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 1217 | | |
923072b8 FG |
1218 | LL | fn foo<N>(_x: N) {} |
1219 | | ^^^ ----- | |
c295e0f8 XL |
1220 | help: you can convert a `u8` to an `i16` |
1221 | | | |
1222 | LL | foo::<i16>(x_u8.into()); | |
1223 | | +++++++ | |
2c00a5a8 XL |
1224 | |
1225 | error[E0308]: mismatched types | |
48663c56 | 1226 | --> $DIR/numeric-cast.rs:186:16 |
0531ce1d XL |
1227 | | |
1228 | LL | foo::<i16>(x_isize); | |
923072b8 FG |
1229 | | ---------- ^^^^^^^ expected `i16`, found `isize` |
1230 | | | | |
1231 | | arguments to this function are incorrect | |
e74abb32 | 1232 | | |
923072b8 FG |
1233 | note: function defined here |
1234 | --> $DIR/numeric-cast.rs:6:4 | |
1235 | | | |
1236 | LL | fn foo<N>(_x: N) {} | |
1237 | | ^^^ ----- | |
29967ef6 | 1238 | help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit |
48663c56 XL |
1239 | | |
1240 | LL | foo::<i16>(x_isize.try_into().unwrap()); | |
c295e0f8 | 1241 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1242 | |
1243 | error[E0308]: mismatched types | |
48663c56 | 1244 | --> $DIR/numeric-cast.rs:188:16 |
0531ce1d XL |
1245 | | |
1246 | LL | foo::<i16>(x_i64); | |
923072b8 FG |
1247 | | ---------- ^^^^^ expected `i16`, found `i64` |
1248 | | | | |
1249 | | arguments to this function are incorrect | |
1250 | | | |
1251 | note: function defined here | |
1252 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1253 | | |
923072b8 FG |
1254 | LL | fn foo<N>(_x: N) {} |
1255 | | ^^^ ----- | |
29967ef6 | 1256 | help: you can convert an `i64` to an `i16` and panic if the converted value doesn't fit |
48663c56 XL |
1257 | | |
1258 | LL | foo::<i16>(x_i64.try_into().unwrap()); | |
c295e0f8 | 1259 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1260 | |
1261 | error[E0308]: mismatched types | |
48663c56 | 1262 | --> $DIR/numeric-cast.rs:190:16 |
0531ce1d XL |
1263 | | |
1264 | LL | foo::<i16>(x_i32); | |
923072b8 FG |
1265 | | ---------- ^^^^^ expected `i16`, found `i32` |
1266 | | | | |
1267 | | arguments to this function are incorrect | |
1268 | | | |
1269 | note: function defined here | |
1270 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1271 | | |
923072b8 FG |
1272 | LL | fn foo<N>(_x: N) {} |
1273 | | ^^^ ----- | |
29967ef6 | 1274 | help: you can convert an `i32` to an `i16` and panic if the converted value doesn't fit |
0531ce1d | 1275 | | |
48663c56 | 1276 | LL | foo::<i16>(x_i32.try_into().unwrap()); |
c295e0f8 | 1277 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1278 | |
1279 | error[E0308]: mismatched types | |
48663c56 | 1280 | --> $DIR/numeric-cast.rs:193:16 |
0531ce1d | 1281 | | |
48663c56 | 1282 | LL | foo::<i16>(x_i8); |
923072b8 FG |
1283 | | ---------- ^^^^ expected `i16`, found `i8` |
1284 | | | | |
1285 | | arguments to this function are incorrect | |
c295e0f8 | 1286 | | |
923072b8 FG |
1287 | note: function defined here |
1288 | --> $DIR/numeric-cast.rs:6:4 | |
1289 | | | |
1290 | LL | fn foo<N>(_x: N) {} | |
1291 | | ^^^ ----- | |
c295e0f8 XL |
1292 | help: you can convert an `i8` to an `i16` |
1293 | | | |
1294 | LL | foo::<i16>(x_i8.into()); | |
1295 | | +++++++ | |
2c00a5a8 XL |
1296 | |
1297 | error[E0308]: mismatched types | |
48663c56 | 1298 | --> $DIR/numeric-cast.rs:198:15 |
0531ce1d XL |
1299 | | |
1300 | LL | foo::<u8>(x_usize); | |
923072b8 FG |
1301 | | --------- ^^^^^^^ expected `u8`, found `usize` |
1302 | | | | |
1303 | | arguments to this function are incorrect | |
1304 | | | |
1305 | note: function defined here | |
1306 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1307 | | |
923072b8 FG |
1308 | LL | fn foo<N>(_x: N) {} |
1309 | | ^^^ ----- | |
29967ef6 | 1310 | help: you can convert a `usize` to a `u8` and panic if the converted value doesn't fit |
48663c56 XL |
1311 | | |
1312 | LL | foo::<u8>(x_usize.try_into().unwrap()); | |
c295e0f8 | 1313 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1314 | |
1315 | error[E0308]: mismatched types | |
48663c56 | 1316 | --> $DIR/numeric-cast.rs:200:15 |
0531ce1d XL |
1317 | | |
1318 | LL | foo::<u8>(x_u64); | |
923072b8 FG |
1319 | | --------- ^^^^^ expected `u8`, found `u64` |
1320 | | | | |
1321 | | arguments to this function are incorrect | |
e74abb32 | 1322 | | |
923072b8 FG |
1323 | note: function defined here |
1324 | --> $DIR/numeric-cast.rs:6:4 | |
1325 | | | |
1326 | LL | fn foo<N>(_x: N) {} | |
1327 | | ^^^ ----- | |
29967ef6 | 1328 | help: you can convert a `u64` to a `u8` and panic if the converted value doesn't fit |
48663c56 XL |
1329 | | |
1330 | LL | foo::<u8>(x_u64.try_into().unwrap()); | |
c295e0f8 | 1331 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1332 | |
1333 | error[E0308]: mismatched types | |
48663c56 | 1334 | --> $DIR/numeric-cast.rs:202:15 |
0531ce1d XL |
1335 | | |
1336 | LL | foo::<u8>(x_u32); | |
923072b8 FG |
1337 | | --------- ^^^^^ expected `u8`, found `u32` |
1338 | | | | |
1339 | | arguments to this function are incorrect | |
1340 | | | |
1341 | note: function defined here | |
1342 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1343 | | |
923072b8 FG |
1344 | LL | fn foo<N>(_x: N) {} |
1345 | | ^^^ ----- | |
29967ef6 | 1346 | help: you can convert a `u32` to a `u8` and panic if the converted value doesn't fit |
48663c56 XL |
1347 | | |
1348 | LL | foo::<u8>(x_u32.try_into().unwrap()); | |
c295e0f8 | 1349 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1350 | |
1351 | error[E0308]: mismatched types | |
48663c56 | 1352 | --> $DIR/numeric-cast.rs:204:15 |
0531ce1d XL |
1353 | | |
1354 | LL | foo::<u8>(x_u16); | |
923072b8 FG |
1355 | | --------- ^^^^^ expected `u8`, found `u16` |
1356 | | | | |
1357 | | arguments to this function are incorrect | |
e74abb32 | 1358 | | |
923072b8 FG |
1359 | note: function defined here |
1360 | --> $DIR/numeric-cast.rs:6:4 | |
1361 | | | |
1362 | LL | fn foo<N>(_x: N) {} | |
1363 | | ^^^ ----- | |
29967ef6 | 1364 | help: you can convert a `u16` to a `u8` and panic if the converted value doesn't fit |
48663c56 XL |
1365 | | |
1366 | LL | foo::<u8>(x_u16.try_into().unwrap()); | |
c295e0f8 | 1367 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1368 | |
1369 | error[E0308]: mismatched types | |
48663c56 | 1370 | --> $DIR/numeric-cast.rs:207:15 |
0531ce1d XL |
1371 | | |
1372 | LL | foo::<u8>(x_isize); | |
923072b8 FG |
1373 | | --------- ^^^^^^^ expected `u8`, found `isize` |
1374 | | | | |
1375 | | arguments to this function are incorrect | |
1376 | | | |
1377 | note: function defined here | |
1378 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1379 | | |
923072b8 FG |
1380 | LL | fn foo<N>(_x: N) {} |
1381 | | ^^^ ----- | |
29967ef6 | 1382 | help: you can convert an `isize` to a `u8` and panic if the converted value doesn't fit |
48663c56 XL |
1383 | | |
1384 | LL | foo::<u8>(x_isize.try_into().unwrap()); | |
c295e0f8 | 1385 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1386 | |
1387 | error[E0308]: mismatched types | |
48663c56 | 1388 | --> $DIR/numeric-cast.rs:209:15 |
0531ce1d XL |
1389 | | |
1390 | LL | foo::<u8>(x_i64); | |
923072b8 FG |
1391 | | --------- ^^^^^ expected `u8`, found `i64` |
1392 | | | | |
1393 | | arguments to this function are incorrect | |
1394 | | | |
1395 | note: function defined here | |
1396 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1397 | | |
923072b8 FG |
1398 | LL | fn foo<N>(_x: N) {} |
1399 | | ^^^ ----- | |
29967ef6 | 1400 | help: you can convert an `i64` to a `u8` and panic if the converted value doesn't fit |
48663c56 XL |
1401 | | |
1402 | LL | foo::<u8>(x_i64.try_into().unwrap()); | |
c295e0f8 | 1403 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1404 | |
1405 | error[E0308]: mismatched types | |
48663c56 | 1406 | --> $DIR/numeric-cast.rs:211:15 |
0531ce1d XL |
1407 | | |
1408 | LL | foo::<u8>(x_i32); | |
923072b8 FG |
1409 | | --------- ^^^^^ expected `u8`, found `i32` |
1410 | | | | |
1411 | | arguments to this function are incorrect | |
e74abb32 | 1412 | | |
923072b8 FG |
1413 | note: function defined here |
1414 | --> $DIR/numeric-cast.rs:6:4 | |
1415 | | | |
1416 | LL | fn foo<N>(_x: N) {} | |
1417 | | ^^^ ----- | |
29967ef6 | 1418 | help: you can convert an `i32` to a `u8` and panic if the converted value doesn't fit |
48663c56 XL |
1419 | | |
1420 | LL | foo::<u8>(x_i32.try_into().unwrap()); | |
c295e0f8 | 1421 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1422 | |
1423 | error[E0308]: mismatched types | |
48663c56 | 1424 | --> $DIR/numeric-cast.rs:213:15 |
0531ce1d XL |
1425 | | |
1426 | LL | foo::<u8>(x_i16); | |
923072b8 FG |
1427 | | --------- ^^^^^ expected `u8`, found `i16` |
1428 | | | | |
1429 | | arguments to this function are incorrect | |
1430 | | | |
1431 | note: function defined here | |
1432 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1433 | | |
923072b8 FG |
1434 | LL | fn foo<N>(_x: N) {} |
1435 | | ^^^ ----- | |
29967ef6 | 1436 | help: you can convert an `i16` to a `u8` and panic if the converted value doesn't fit |
48663c56 XL |
1437 | | |
1438 | LL | foo::<u8>(x_i16.try_into().unwrap()); | |
c295e0f8 | 1439 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1440 | |
1441 | error[E0308]: mismatched types | |
48663c56 | 1442 | --> $DIR/numeric-cast.rs:215:15 |
0531ce1d XL |
1443 | | |
1444 | LL | foo::<u8>(x_i8); | |
923072b8 FG |
1445 | | --------- ^^^^ expected `u8`, found `i8` |
1446 | | | | |
1447 | | arguments to this function are incorrect | |
e74abb32 | 1448 | | |
923072b8 FG |
1449 | note: function defined here |
1450 | --> $DIR/numeric-cast.rs:6:4 | |
1451 | | | |
1452 | LL | fn foo<N>(_x: N) {} | |
1453 | | ^^^ ----- | |
29967ef6 | 1454 | help: you can convert an `i8` to a `u8` and panic if the converted value doesn't fit |
0531ce1d | 1455 | | |
48663c56 | 1456 | LL | foo::<u8>(x_i8.try_into().unwrap()); |
c295e0f8 | 1457 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1458 | |
1459 | error[E0308]: mismatched types | |
48663c56 | 1460 | --> $DIR/numeric-cast.rs:220:15 |
0531ce1d XL |
1461 | | |
1462 | LL | foo::<i8>(x_usize); | |
923072b8 FG |
1463 | | --------- ^^^^^^^ expected `i8`, found `usize` |
1464 | | | | |
1465 | | arguments to this function are incorrect | |
1466 | | | |
1467 | note: function defined here | |
1468 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1469 | | |
923072b8 FG |
1470 | LL | fn foo<N>(_x: N) {} |
1471 | | ^^^ ----- | |
29967ef6 | 1472 | help: you can convert a `usize` to an `i8` and panic if the converted value doesn't fit |
48663c56 XL |
1473 | | |
1474 | LL | foo::<i8>(x_usize.try_into().unwrap()); | |
c295e0f8 | 1475 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1476 | |
1477 | error[E0308]: mismatched types | |
48663c56 | 1478 | --> $DIR/numeric-cast.rs:222:15 |
0531ce1d XL |
1479 | | |
1480 | LL | foo::<i8>(x_u64); | |
923072b8 FG |
1481 | | --------- ^^^^^ expected `i8`, found `u64` |
1482 | | | | |
1483 | | arguments to this function are incorrect | |
e74abb32 | 1484 | | |
923072b8 FG |
1485 | note: function defined here |
1486 | --> $DIR/numeric-cast.rs:6:4 | |
1487 | | | |
1488 | LL | fn foo<N>(_x: N) {} | |
1489 | | ^^^ ----- | |
29967ef6 | 1490 | help: you can convert a `u64` to an `i8` and panic if the converted value doesn't fit |
48663c56 XL |
1491 | | |
1492 | LL | foo::<i8>(x_u64.try_into().unwrap()); | |
c295e0f8 | 1493 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1494 | |
1495 | error[E0308]: mismatched types | |
48663c56 | 1496 | --> $DIR/numeric-cast.rs:224:15 |
0531ce1d XL |
1497 | | |
1498 | LL | foo::<i8>(x_u32); | |
923072b8 FG |
1499 | | --------- ^^^^^ expected `i8`, found `u32` |
1500 | | | | |
1501 | | arguments to this function are incorrect | |
1502 | | | |
1503 | note: function defined here | |
1504 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1505 | | |
923072b8 FG |
1506 | LL | fn foo<N>(_x: N) {} |
1507 | | ^^^ ----- | |
29967ef6 | 1508 | help: you can convert a `u32` to an `i8` and panic if the converted value doesn't fit |
48663c56 XL |
1509 | | |
1510 | LL | foo::<i8>(x_u32.try_into().unwrap()); | |
c295e0f8 | 1511 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1512 | |
1513 | error[E0308]: mismatched types | |
48663c56 | 1514 | --> $DIR/numeric-cast.rs:226:15 |
0531ce1d XL |
1515 | | |
1516 | LL | foo::<i8>(x_u16); | |
923072b8 FG |
1517 | | --------- ^^^^^ expected `i8`, found `u16` |
1518 | | | | |
1519 | | arguments to this function are incorrect | |
1520 | | | |
1521 | note: function defined here | |
1522 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1523 | | |
923072b8 FG |
1524 | LL | fn foo<N>(_x: N) {} |
1525 | | ^^^ ----- | |
29967ef6 | 1526 | help: you can convert a `u16` to an `i8` and panic if the converted value doesn't fit |
48663c56 XL |
1527 | | |
1528 | LL | foo::<i8>(x_u16.try_into().unwrap()); | |
c295e0f8 | 1529 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1530 | |
1531 | error[E0308]: mismatched types | |
48663c56 | 1532 | --> $DIR/numeric-cast.rs:228:15 |
0531ce1d XL |
1533 | | |
1534 | LL | foo::<i8>(x_u8); | |
923072b8 FG |
1535 | | --------- ^^^^ expected `i8`, found `u8` |
1536 | | | | |
1537 | | arguments to this function are incorrect | |
e74abb32 | 1538 | | |
923072b8 FG |
1539 | note: function defined here |
1540 | --> $DIR/numeric-cast.rs:6:4 | |
1541 | | | |
1542 | LL | fn foo<N>(_x: N) {} | |
1543 | | ^^^ ----- | |
29967ef6 | 1544 | help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit |
48663c56 XL |
1545 | | |
1546 | LL | foo::<i8>(x_u8.try_into().unwrap()); | |
c295e0f8 | 1547 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1548 | |
1549 | error[E0308]: mismatched types | |
48663c56 | 1550 | --> $DIR/numeric-cast.rs:230:15 |
0531ce1d XL |
1551 | | |
1552 | LL | foo::<i8>(x_isize); | |
923072b8 FG |
1553 | | --------- ^^^^^^^ expected `i8`, found `isize` |
1554 | | | | |
1555 | | arguments to this function are incorrect | |
1556 | | | |
1557 | note: function defined here | |
1558 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1559 | | |
923072b8 FG |
1560 | LL | fn foo<N>(_x: N) {} |
1561 | | ^^^ ----- | |
29967ef6 | 1562 | help: you can convert an `isize` to an `i8` and panic if the converted value doesn't fit |
48663c56 XL |
1563 | | |
1564 | LL | foo::<i8>(x_isize.try_into().unwrap()); | |
c295e0f8 | 1565 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1566 | |
1567 | error[E0308]: mismatched types | |
48663c56 | 1568 | --> $DIR/numeric-cast.rs:232:15 |
0531ce1d XL |
1569 | | |
1570 | LL | foo::<i8>(x_i64); | |
923072b8 FG |
1571 | | --------- ^^^^^ expected `i8`, found `i64` |
1572 | | | | |
1573 | | arguments to this function are incorrect | |
e74abb32 | 1574 | | |
923072b8 FG |
1575 | note: function defined here |
1576 | --> $DIR/numeric-cast.rs:6:4 | |
1577 | | | |
1578 | LL | fn foo<N>(_x: N) {} | |
1579 | | ^^^ ----- | |
29967ef6 | 1580 | help: you can convert an `i64` to an `i8` and panic if the converted value doesn't fit |
48663c56 XL |
1581 | | |
1582 | LL | foo::<i8>(x_i64.try_into().unwrap()); | |
c295e0f8 | 1583 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1584 | |
1585 | error[E0308]: mismatched types | |
48663c56 | 1586 | --> $DIR/numeric-cast.rs:234:15 |
0531ce1d XL |
1587 | | |
1588 | LL | foo::<i8>(x_i32); | |
923072b8 FG |
1589 | | --------- ^^^^^ expected `i8`, found `i32` |
1590 | | | | |
1591 | | arguments to this function are incorrect | |
1592 | | | |
1593 | note: function defined here | |
1594 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1595 | | |
923072b8 FG |
1596 | LL | fn foo<N>(_x: N) {} |
1597 | | ^^^ ----- | |
29967ef6 | 1598 | help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit |
48663c56 XL |
1599 | | |
1600 | LL | foo::<i8>(x_i32.try_into().unwrap()); | |
c295e0f8 | 1601 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1602 | |
1603 | error[E0308]: mismatched types | |
48663c56 | 1604 | --> $DIR/numeric-cast.rs:236:15 |
0531ce1d XL |
1605 | | |
1606 | LL | foo::<i8>(x_i16); | |
923072b8 FG |
1607 | | --------- ^^^^^ expected `i8`, found `i16` |
1608 | | | | |
1609 | | arguments to this function are incorrect | |
e74abb32 | 1610 | | |
923072b8 FG |
1611 | note: function defined here |
1612 | --> $DIR/numeric-cast.rs:6:4 | |
1613 | | | |
1614 | LL | fn foo<N>(_x: N) {} | |
1615 | | ^^^ ----- | |
29967ef6 | 1616 | help: you can convert an `i16` to an `i8` and panic if the converted value doesn't fit |
0531ce1d | 1617 | | |
48663c56 | 1618 | LL | foo::<i8>(x_i16.try_into().unwrap()); |
c295e0f8 | 1619 | | ++++++++++++++++++++ |
2c00a5a8 XL |
1620 | |
1621 | error[E0308]: mismatched types | |
48663c56 | 1622 | --> $DIR/numeric-cast.rs:242:16 |
0531ce1d XL |
1623 | | |
1624 | LL | foo::<f64>(x_usize); | |
923072b8 FG |
1625 | | ---------- ^^^^^^^ expected `f64`, found `usize` |
1626 | | | | |
1627 | | arguments to this function are incorrect | |
1628 | | | |
1629 | note: function defined here | |
1630 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1631 | | |
923072b8 FG |
1632 | LL | fn foo<N>(_x: N) {} |
1633 | | ^^^ ----- | |
a2a8927a XL |
1634 | help: you can cast a `usize` to an `f64`, producing the floating point representation of the integer, rounded if necessary |
1635 | | | |
48663c56 | 1636 | LL | foo::<f64>(x_usize as f64); |
c295e0f8 | 1637 | | ++++++ |
2c00a5a8 XL |
1638 | |
1639 | error[E0308]: mismatched types | |
48663c56 | 1640 | --> $DIR/numeric-cast.rs:244:16 |
0531ce1d XL |
1641 | | |
1642 | LL | foo::<f64>(x_u64); | |
923072b8 FG |
1643 | | ---------- ^^^^^ expected `f64`, found `u64` |
1644 | | | | |
1645 | | arguments to this function are incorrect | |
1646 | | | |
1647 | note: function defined here | |
1648 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1649 | | |
923072b8 FG |
1650 | LL | fn foo<N>(_x: N) {} |
1651 | | ^^^ ----- | |
a2a8927a XL |
1652 | help: you can cast a `u64` to an `f64`, producing the floating point representation of the integer, rounded if necessary |
1653 | | | |
48663c56 | 1654 | LL | foo::<f64>(x_u64 as f64); |
c295e0f8 | 1655 | | ++++++ |
2c00a5a8 XL |
1656 | |
1657 | error[E0308]: mismatched types | |
48663c56 | 1658 | --> $DIR/numeric-cast.rs:246:16 |
0531ce1d XL |
1659 | | |
1660 | LL | foo::<f64>(x_u32); | |
923072b8 FG |
1661 | | ---------- ^^^^^ expected `f64`, found `u32` |
1662 | | | | |
1663 | | arguments to this function are incorrect | |
e74abb32 | 1664 | | |
923072b8 FG |
1665 | note: function defined here |
1666 | --> $DIR/numeric-cast.rs:6:4 | |
1667 | | | |
1668 | LL | fn foo<N>(_x: N) {} | |
1669 | | ^^^ ----- | |
29967ef6 | 1670 | help: you can convert a `u32` to an `f64`, producing the floating point representation of the integer |
0531ce1d XL |
1671 | | |
1672 | LL | foo::<f64>(x_u32.into()); | |
c295e0f8 | 1673 | | +++++++ |
2c00a5a8 XL |
1674 | |
1675 | error[E0308]: mismatched types | |
48663c56 | 1676 | --> $DIR/numeric-cast.rs:248:16 |
0531ce1d XL |
1677 | | |
1678 | LL | foo::<f64>(x_u16); | |
923072b8 FG |
1679 | | ---------- ^^^^^ expected `f64`, found `u16` |
1680 | | | | |
1681 | | arguments to this function are incorrect | |
1682 | | | |
1683 | note: function defined here | |
1684 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1685 | | |
923072b8 FG |
1686 | LL | fn foo<N>(_x: N) {} |
1687 | | ^^^ ----- | |
29967ef6 | 1688 | help: you can convert a `u16` to an `f64`, producing the floating point representation of the integer |
0531ce1d XL |
1689 | | |
1690 | LL | foo::<f64>(x_u16.into()); | |
c295e0f8 | 1691 | | +++++++ |
2c00a5a8 XL |
1692 | |
1693 | error[E0308]: mismatched types | |
48663c56 | 1694 | --> $DIR/numeric-cast.rs:250:16 |
0531ce1d XL |
1695 | | |
1696 | LL | foo::<f64>(x_u8); | |
923072b8 FG |
1697 | | ---------- ^^^^ expected `f64`, found `u8` |
1698 | | | | |
1699 | | arguments to this function are incorrect | |
e74abb32 | 1700 | | |
923072b8 FG |
1701 | note: function defined here |
1702 | --> $DIR/numeric-cast.rs:6:4 | |
1703 | | | |
1704 | LL | fn foo<N>(_x: N) {} | |
1705 | | ^^^ ----- | |
29967ef6 | 1706 | help: you can convert a `u8` to an `f64`, producing the floating point representation of the integer |
0531ce1d XL |
1707 | | |
1708 | LL | foo::<f64>(x_u8.into()); | |
c295e0f8 | 1709 | | +++++++ |
2c00a5a8 XL |
1710 | |
1711 | error[E0308]: mismatched types | |
48663c56 | 1712 | --> $DIR/numeric-cast.rs:252:16 |
0531ce1d XL |
1713 | | |
1714 | LL | foo::<f64>(x_isize); | |
923072b8 FG |
1715 | | ---------- ^^^^^^^ expected `f64`, found `isize` |
1716 | | | | |
1717 | | arguments to this function are incorrect | |
1718 | | | |
1719 | note: function defined here | |
1720 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1721 | | |
923072b8 FG |
1722 | LL | fn foo<N>(_x: N) {} |
1723 | | ^^^ ----- | |
29967ef6 | 1724 | help: you can convert an `isize` to an `f64`, producing the floating point representation of the integer, rounded if necessary |
48663c56 XL |
1725 | | |
1726 | LL | foo::<f64>(x_isize as f64); | |
c295e0f8 | 1727 | | ++++++ |
2c00a5a8 XL |
1728 | |
1729 | error[E0308]: mismatched types | |
48663c56 | 1730 | --> $DIR/numeric-cast.rs:254:16 |
0531ce1d XL |
1731 | | |
1732 | LL | foo::<f64>(x_i64); | |
923072b8 FG |
1733 | | ---------- ^^^^^ expected `f64`, found `i64` |
1734 | | | | |
1735 | | arguments to this function are incorrect | |
e74abb32 | 1736 | | |
923072b8 FG |
1737 | note: function defined here |
1738 | --> $DIR/numeric-cast.rs:6:4 | |
1739 | | | |
1740 | LL | fn foo<N>(_x: N) {} | |
1741 | | ^^^ ----- | |
29967ef6 | 1742 | help: you can convert an `i64` to an `f64`, producing the floating point representation of the integer, rounded if necessary |
48663c56 XL |
1743 | | |
1744 | LL | foo::<f64>(x_i64 as f64); | |
c295e0f8 | 1745 | | ++++++ |
2c00a5a8 XL |
1746 | |
1747 | error[E0308]: mismatched types | |
48663c56 | 1748 | --> $DIR/numeric-cast.rs:256:16 |
0531ce1d XL |
1749 | | |
1750 | LL | foo::<f64>(x_i32); | |
923072b8 FG |
1751 | | ---------- ^^^^^ expected `f64`, found `i32` |
1752 | | | | |
1753 | | arguments to this function are incorrect | |
1754 | | | |
1755 | note: function defined here | |
1756 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1757 | | |
923072b8 FG |
1758 | LL | fn foo<N>(_x: N) {} |
1759 | | ^^^ ----- | |
29967ef6 | 1760 | help: you can convert an `i32` to an `f64`, producing the floating point representation of the integer |
0531ce1d XL |
1761 | | |
1762 | LL | foo::<f64>(x_i32.into()); | |
c295e0f8 | 1763 | | +++++++ |
2c00a5a8 XL |
1764 | |
1765 | error[E0308]: mismatched types | |
48663c56 | 1766 | --> $DIR/numeric-cast.rs:258:16 |
0531ce1d XL |
1767 | | |
1768 | LL | foo::<f64>(x_i16); | |
923072b8 FG |
1769 | | ---------- ^^^^^ expected `f64`, found `i16` |
1770 | | | | |
1771 | | arguments to this function are incorrect | |
1772 | | | |
1773 | note: function defined here | |
1774 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1775 | | |
923072b8 FG |
1776 | LL | fn foo<N>(_x: N) {} |
1777 | | ^^^ ----- | |
29967ef6 | 1778 | help: you can convert an `i16` to an `f64`, producing the floating point representation of the integer |
0531ce1d XL |
1779 | | |
1780 | LL | foo::<f64>(x_i16.into()); | |
c295e0f8 | 1781 | | +++++++ |
2c00a5a8 XL |
1782 | |
1783 | error[E0308]: mismatched types | |
48663c56 | 1784 | --> $DIR/numeric-cast.rs:260:16 |
0531ce1d XL |
1785 | | |
1786 | LL | foo::<f64>(x_i8); | |
923072b8 FG |
1787 | | ---------- ^^^^ expected `f64`, found `i8` |
1788 | | | | |
1789 | | arguments to this function are incorrect | |
e74abb32 | 1790 | | |
923072b8 FG |
1791 | note: function defined here |
1792 | --> $DIR/numeric-cast.rs:6:4 | |
1793 | | | |
1794 | LL | fn foo<N>(_x: N) {} | |
1795 | | ^^^ ----- | |
29967ef6 | 1796 | help: you can convert an `i8` to an `f64`, producing the floating point representation of the integer |
0531ce1d XL |
1797 | | |
1798 | LL | foo::<f64>(x_i8.into()); | |
c295e0f8 | 1799 | | +++++++ |
2c00a5a8 XL |
1800 | |
1801 | error[E0308]: mismatched types | |
48663c56 | 1802 | --> $DIR/numeric-cast.rs:263:16 |
0531ce1d XL |
1803 | | |
1804 | LL | foo::<f64>(x_f32); | |
923072b8 FG |
1805 | | ---------- ^^^^^ expected `f64`, found `f32` |
1806 | | | | |
1807 | | arguments to this function are incorrect | |
1808 | | | |
1809 | note: function defined here | |
1810 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 1811 | | |
923072b8 FG |
1812 | LL | fn foo<N>(_x: N) {} |
1813 | | ^^^ ----- | |
c295e0f8 XL |
1814 | help: you can convert an `f32` to an `f64` |
1815 | | | |
1816 | LL | foo::<f64>(x_f32.into()); | |
1817 | | +++++++ | |
2c00a5a8 XL |
1818 | |
1819 | error[E0308]: mismatched types | |
48663c56 | 1820 | --> $DIR/numeric-cast.rs:266:16 |
0531ce1d XL |
1821 | | |
1822 | LL | foo::<f32>(x_usize); | |
923072b8 FG |
1823 | | ---------- ^^^^^^^ expected `f32`, found `usize` |
1824 | | | | |
1825 | | arguments to this function are incorrect | |
e74abb32 | 1826 | | |
923072b8 FG |
1827 | note: function defined here |
1828 | --> $DIR/numeric-cast.rs:6:4 | |
1829 | | | |
1830 | LL | fn foo<N>(_x: N) {} | |
1831 | | ^^^ ----- | |
a2a8927a XL |
1832 | help: you can cast a `usize` to an `f32`, producing the floating point representation of the integer, rounded if necessary |
1833 | | | |
48663c56 | 1834 | LL | foo::<f32>(x_usize as f32); |
c295e0f8 | 1835 | | ++++++ |
2c00a5a8 XL |
1836 | |
1837 | error[E0308]: mismatched types | |
48663c56 | 1838 | --> $DIR/numeric-cast.rs:268:16 |
0531ce1d XL |
1839 | | |
1840 | LL | foo::<f32>(x_u64); | |
923072b8 FG |
1841 | | ---------- ^^^^^ expected `f32`, found `u64` |
1842 | | | | |
1843 | | arguments to this function are incorrect | |
1844 | | | |
1845 | note: function defined here | |
1846 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1847 | | |
923072b8 FG |
1848 | LL | fn foo<N>(_x: N) {} |
1849 | | ^^^ ----- | |
a2a8927a XL |
1850 | help: you can cast a `u64` to an `f32`, producing the floating point representation of the integer, rounded if necessary |
1851 | | | |
48663c56 | 1852 | LL | foo::<f32>(x_u64 as f32); |
c295e0f8 | 1853 | | ++++++ |
2c00a5a8 XL |
1854 | |
1855 | error[E0308]: mismatched types | |
48663c56 | 1856 | --> $DIR/numeric-cast.rs:270:16 |
0531ce1d XL |
1857 | | |
1858 | LL | foo::<f32>(x_u32); | |
923072b8 FG |
1859 | | ---------- ^^^^^ expected `f32`, found `u32` |
1860 | | | | |
1861 | | arguments to this function are incorrect | |
e74abb32 | 1862 | | |
923072b8 FG |
1863 | note: function defined here |
1864 | --> $DIR/numeric-cast.rs:6:4 | |
1865 | | | |
1866 | LL | fn foo<N>(_x: N) {} | |
1867 | | ^^^ ----- | |
a2a8927a XL |
1868 | help: you can cast a `u32` to an `f32`, producing the floating point representation of the integer, rounded if necessary |
1869 | | | |
48663c56 | 1870 | LL | foo::<f32>(x_u32 as f32); |
c295e0f8 | 1871 | | ++++++ |
2c00a5a8 XL |
1872 | |
1873 | error[E0308]: mismatched types | |
48663c56 | 1874 | --> $DIR/numeric-cast.rs:272:16 |
0531ce1d XL |
1875 | | |
1876 | LL | foo::<f32>(x_u16); | |
923072b8 FG |
1877 | | ---------- ^^^^^ expected `f32`, found `u16` |
1878 | | | | |
1879 | | arguments to this function are incorrect | |
1880 | | | |
1881 | note: function defined here | |
1882 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1883 | | |
923072b8 FG |
1884 | LL | fn foo<N>(_x: N) {} |
1885 | | ^^^ ----- | |
29967ef6 | 1886 | help: you can convert a `u16` to an `f32`, producing the floating point representation of the integer |
0531ce1d XL |
1887 | | |
1888 | LL | foo::<f32>(x_u16.into()); | |
c295e0f8 | 1889 | | +++++++ |
2c00a5a8 XL |
1890 | |
1891 | error[E0308]: mismatched types | |
48663c56 | 1892 | --> $DIR/numeric-cast.rs:274:16 |
0531ce1d XL |
1893 | | |
1894 | LL | foo::<f32>(x_u8); | |
923072b8 FG |
1895 | | ---------- ^^^^ expected `f32`, found `u8` |
1896 | | | | |
1897 | | arguments to this function are incorrect | |
1898 | | | |
1899 | note: function defined here | |
1900 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1901 | | |
923072b8 FG |
1902 | LL | fn foo<N>(_x: N) {} |
1903 | | ^^^ ----- | |
29967ef6 | 1904 | help: you can convert a `u8` to an `f32`, producing the floating point representation of the integer |
0531ce1d XL |
1905 | | |
1906 | LL | foo::<f32>(x_u8.into()); | |
c295e0f8 | 1907 | | +++++++ |
2c00a5a8 XL |
1908 | |
1909 | error[E0308]: mismatched types | |
48663c56 | 1910 | --> $DIR/numeric-cast.rs:276:16 |
0531ce1d XL |
1911 | | |
1912 | LL | foo::<f32>(x_isize); | |
923072b8 FG |
1913 | | ---------- ^^^^^^^ expected `f32`, found `isize` |
1914 | | | | |
1915 | | arguments to this function are incorrect | |
e74abb32 | 1916 | | |
923072b8 FG |
1917 | note: function defined here |
1918 | --> $DIR/numeric-cast.rs:6:4 | |
1919 | | | |
1920 | LL | fn foo<N>(_x: N) {} | |
1921 | | ^^^ ----- | |
29967ef6 | 1922 | help: you can convert an `isize` to an `f32`, producing the floating point representation of the integer, rounded if necessary |
48663c56 XL |
1923 | | |
1924 | LL | foo::<f32>(x_isize as f32); | |
c295e0f8 | 1925 | | ++++++ |
2c00a5a8 XL |
1926 | |
1927 | error[E0308]: mismatched types | |
48663c56 | 1928 | --> $DIR/numeric-cast.rs:278:16 |
0531ce1d XL |
1929 | | |
1930 | LL | foo::<f32>(x_i64); | |
923072b8 FG |
1931 | | ---------- ^^^^^ expected `f32`, found `i64` |
1932 | | | | |
1933 | | arguments to this function are incorrect | |
1934 | | | |
1935 | note: function defined here | |
1936 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1937 | | |
923072b8 FG |
1938 | LL | fn foo<N>(_x: N) {} |
1939 | | ^^^ ----- | |
29967ef6 | 1940 | help: you can convert an `i64` to an `f32`, producing the floating point representation of the integer, rounded if necessary |
48663c56 XL |
1941 | | |
1942 | LL | foo::<f32>(x_i64 as f32); | |
c295e0f8 | 1943 | | ++++++ |
2c00a5a8 XL |
1944 | |
1945 | error[E0308]: mismatched types | |
48663c56 | 1946 | --> $DIR/numeric-cast.rs:280:16 |
0531ce1d XL |
1947 | | |
1948 | LL | foo::<f32>(x_i32); | |
923072b8 FG |
1949 | | ---------- ^^^^^ expected `f32`, found `i32` |
1950 | | | | |
1951 | | arguments to this function are incorrect | |
e74abb32 | 1952 | | |
923072b8 FG |
1953 | note: function defined here |
1954 | --> $DIR/numeric-cast.rs:6:4 | |
1955 | | | |
1956 | LL | fn foo<N>(_x: N) {} | |
1957 | | ^^^ ----- | |
29967ef6 | 1958 | help: you can convert an `i32` to an `f32`, producing the floating point representation of the integer, rounded if necessary |
48663c56 XL |
1959 | | |
1960 | LL | foo::<f32>(x_i32 as f32); | |
c295e0f8 | 1961 | | ++++++ |
2c00a5a8 XL |
1962 | |
1963 | error[E0308]: mismatched types | |
48663c56 | 1964 | --> $DIR/numeric-cast.rs:282:16 |
0531ce1d XL |
1965 | | |
1966 | LL | foo::<f32>(x_i16); | |
923072b8 FG |
1967 | | ---------- ^^^^^ expected `f32`, found `i16` |
1968 | | | | |
1969 | | arguments to this function are incorrect | |
1970 | | | |
1971 | note: function defined here | |
1972 | --> $DIR/numeric-cast.rs:6:4 | |
e74abb32 | 1973 | | |
923072b8 FG |
1974 | LL | fn foo<N>(_x: N) {} |
1975 | | ^^^ ----- | |
29967ef6 | 1976 | help: you can convert an `i16` to an `f32`, producing the floating point representation of the integer |
0531ce1d XL |
1977 | | |
1978 | LL | foo::<f32>(x_i16.into()); | |
c295e0f8 | 1979 | | +++++++ |
2c00a5a8 XL |
1980 | |
1981 | error[E0308]: mismatched types | |
48663c56 | 1982 | --> $DIR/numeric-cast.rs:284:16 |
0531ce1d XL |
1983 | | |
1984 | LL | foo::<f32>(x_i8); | |
923072b8 FG |
1985 | | ---------- ^^^^ expected `f32`, found `i8` |
1986 | | | | |
1987 | | arguments to this function are incorrect | |
e74abb32 | 1988 | | |
923072b8 FG |
1989 | note: function defined here |
1990 | --> $DIR/numeric-cast.rs:6:4 | |
1991 | | | |
1992 | LL | fn foo<N>(_x: N) {} | |
1993 | | ^^^ ----- | |
29967ef6 | 1994 | help: you can convert an `i8` to an `f32`, producing the floating point representation of the integer |
0531ce1d XL |
1995 | | |
1996 | LL | foo::<f32>(x_i8.into()); | |
c295e0f8 | 1997 | | +++++++ |
2c00a5a8 XL |
1998 | |
1999 | error[E0308]: mismatched types | |
48663c56 | 2000 | --> $DIR/numeric-cast.rs:289:16 |
0531ce1d XL |
2001 | | |
2002 | LL | foo::<u32>(x_u8 as u16); | |
923072b8 FG |
2003 | | ---------- ^^^^^^^^^^^ expected `u32`, found `u16` |
2004 | | | | |
2005 | | arguments to this function are incorrect | |
2006 | | | |
2007 | note: function defined here | |
2008 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 2009 | | |
923072b8 FG |
2010 | LL | fn foo<N>(_x: N) {} |
2011 | | ^^^ ----- | |
c295e0f8 XL |
2012 | help: you can convert a `u16` to a `u32` |
2013 | | | |
2014 | LL | foo::<u32>((x_u8 as u16).into()); | |
2015 | | + ++++++++ | |
2c00a5a8 XL |
2016 | |
2017 | error[E0308]: mismatched types | |
48663c56 | 2018 | --> $DIR/numeric-cast.rs:291:16 |
0531ce1d XL |
2019 | | |
2020 | LL | foo::<i32>(-x_i8); | |
923072b8 FG |
2021 | | ---------- ^^^^^ expected `i32`, found `i8` |
2022 | | | | |
2023 | | arguments to this function are incorrect | |
2024 | | | |
2025 | note: function defined here | |
2026 | --> $DIR/numeric-cast.rs:6:4 | |
c295e0f8 | 2027 | | |
923072b8 FG |
2028 | LL | fn foo<N>(_x: N) {} |
2029 | | ^^^ ----- | |
c295e0f8 XL |
2030 | help: you can convert an `i8` to an `i32` |
2031 | | | |
2032 | LL | foo::<i32>((-x_i8).into()); | |
2033 | | + ++++++++ | |
2c00a5a8 | 2034 | |
48663c56 | 2035 | error: aborting due to 113 previous errors |
2c00a5a8 | 2036 | |
0531ce1d | 2037 | For more information about this error, try `rustc --explain E0308`. |