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