1 error[E0308]: mismatched types
2 --> $DIR/numeric-cast.rs:23:18
4 LL | foo::<usize>(x_u64);
5 | ^^^^^ expected usize, found u64
6 help: you can convert an `u64` to `usize` or panic if it the converted value wouldn't fit
8 LL | foo::<usize>(x_u64.try_into().unwrap());
9 | ^^^^^^^^^^^^^^^^^^^^^^^^^
11 error[E0308]: mismatched types
12 --> $DIR/numeric-cast.rs:25:18
14 LL | foo::<usize>(x_u32);
15 | ^^^^^ expected usize, found u32
16 help: you can convert an `u32` to `usize` or panic if it the converted value wouldn't fit
18 LL | foo::<usize>(x_u32.try_into().unwrap());
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^
21 error[E0308]: mismatched types
22 --> $DIR/numeric-cast.rs:27:18
24 LL | foo::<usize>(x_u16);
25 | ^^^^^ expected usize, found u16
26 help: you can convert an `u16` to `usize` or panic if it the converted value wouldn't fit
28 LL | foo::<usize>(x_u16.try_into().unwrap());
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^
31 error[E0308]: mismatched types
32 --> $DIR/numeric-cast.rs:29:18
34 LL | foo::<usize>(x_u8);
35 | ^^^^ expected usize, found u8
36 help: you can convert an `u8` to `usize` or panic if it the converted value wouldn't fit
38 LL | foo::<usize>(x_u8.try_into().unwrap());
39 | ^^^^^^^^^^^^^^^^^^^^^^^^
41 error[E0308]: mismatched types
42 --> $DIR/numeric-cast.rs:31:18
44 LL | foo::<usize>(x_isize);
45 | ^^^^^^^ expected usize, found isize
46 help: you can convert an `isize` to `usize` or panic if it the converted value wouldn't fit
48 LL | foo::<usize>(x_isize.try_into().unwrap());
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
51 error[E0308]: mismatched types
52 --> $DIR/numeric-cast.rs:33:18
54 LL | foo::<usize>(x_i64);
55 | ^^^^^ expected usize, found i64
56 help: you can convert an `i64` to `usize` or panic if it the converted value wouldn't fit
58 LL | foo::<usize>(x_i64.try_into().unwrap());
59 | ^^^^^^^^^^^^^^^^^^^^^^^^^
61 error[E0308]: mismatched types
62 --> $DIR/numeric-cast.rs:35:18
64 LL | foo::<usize>(x_i32);
65 | ^^^^^ expected usize, found i32
66 help: you can convert an `i32` to `usize` or panic if it the converted value wouldn't fit
68 LL | foo::<usize>(x_i32.try_into().unwrap());
69 | ^^^^^^^^^^^^^^^^^^^^^^^^^
71 error[E0308]: mismatched types
72 --> $DIR/numeric-cast.rs:37:18
74 LL | foo::<usize>(x_i16);
75 | ^^^^^ expected usize, found i16
76 help: you can convert an `i16` to `usize` or panic if it the converted value wouldn't fit
78 LL | foo::<usize>(x_i16.try_into().unwrap());
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^
81 error[E0308]: mismatched types
82 --> $DIR/numeric-cast.rs:39:18
84 LL | foo::<usize>(x_i8);
85 | ^^^^ expected usize, found i8
86 help: you can convert an `i8` to `usize` or panic if it the converted value wouldn't fit
88 LL | foo::<usize>(x_i8.try_into().unwrap());
89 | ^^^^^^^^^^^^^^^^^^^^^^^^
91 error[E0308]: mismatched types
92 --> $DIR/numeric-cast.rs:44:18
94 LL | foo::<isize>(x_usize);
95 | ^^^^^^^ expected isize, found usize
96 help: you can convert an `usize` to `isize` or panic if it the converted value wouldn't fit
98 LL | foo::<isize>(x_usize.try_into().unwrap());
99 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
101 error[E0308]: mismatched types
102 --> $DIR/numeric-cast.rs:46:18
104 LL | foo::<isize>(x_u64);
105 | ^^^^^ expected isize, found u64
106 help: you can convert an `u64` to `isize` or panic if it the converted value wouldn't fit
108 LL | foo::<isize>(x_u64.try_into().unwrap());
109 | ^^^^^^^^^^^^^^^^^^^^^^^^^
111 error[E0308]: mismatched types
112 --> $DIR/numeric-cast.rs:48:18
114 LL | foo::<isize>(x_u32);
115 | ^^^^^ expected isize, found u32
116 help: you can convert an `u32` to `isize` or panic if it the converted value wouldn't fit
118 LL | foo::<isize>(x_u32.try_into().unwrap());
119 | ^^^^^^^^^^^^^^^^^^^^^^^^^
121 error[E0308]: mismatched types
122 --> $DIR/numeric-cast.rs:50:18
124 LL | foo::<isize>(x_u16);
125 | ^^^^^ expected isize, found u16
126 help: you can convert an `u16` to `isize` or panic if it the converted value wouldn't fit
128 LL | foo::<isize>(x_u16.try_into().unwrap());
129 | ^^^^^^^^^^^^^^^^^^^^^^^^^
131 error[E0308]: mismatched types
132 --> $DIR/numeric-cast.rs:52:18
134 LL | foo::<isize>(x_u8);
135 | ^^^^ expected isize, found u8
136 help: you can convert an `u8` to `isize` or panic if it the converted value wouldn't fit
138 LL | foo::<isize>(x_u8.try_into().unwrap());
139 | ^^^^^^^^^^^^^^^^^^^^^^^^
141 error[E0308]: mismatched types
142 --> $DIR/numeric-cast.rs:55:18
144 LL | foo::<isize>(x_i64);
145 | ^^^^^ expected isize, found i64
146 help: you can convert an `i64` to `isize` or panic if it the converted value wouldn't fit
148 LL | foo::<isize>(x_i64.try_into().unwrap());
149 | ^^^^^^^^^^^^^^^^^^^^^^^^^
151 error[E0308]: mismatched types
152 --> $DIR/numeric-cast.rs:57:18
154 LL | foo::<isize>(x_i32);
155 | ^^^^^ expected isize, found i32
156 help: you can convert an `i32` to `isize` or panic if it the converted value wouldn't fit
158 LL | foo::<isize>(x_i32.try_into().unwrap());
159 | ^^^^^^^^^^^^^^^^^^^^^^^^^
161 error[E0308]: mismatched types
162 --> $DIR/numeric-cast.rs:59:18
164 LL | foo::<isize>(x_i16);
165 | ^^^^^ expected isize, found i16
166 help: you can convert an `i16` to `isize` or panic if it the converted value wouldn't fit
168 LL | foo::<isize>(x_i16.try_into().unwrap());
169 | ^^^^^^^^^^^^^^^^^^^^^^^^^
171 error[E0308]: mismatched types
172 --> $DIR/numeric-cast.rs:61:18
174 LL | foo::<isize>(x_i8);
175 | ^^^^ expected isize, found i8
176 help: you can convert an `i8` to `isize` or panic if it the converted value wouldn't fit
178 LL | foo::<isize>(x_i8.try_into().unwrap());
179 | ^^^^^^^^^^^^^^^^^^^^^^^^
181 error[E0308]: mismatched types
182 --> $DIR/numeric-cast.rs:66:16
184 LL | foo::<u64>(x_usize);
185 | ^^^^^^^ expected u64, found usize
186 help: you can convert an `usize` to `u64` or panic if it the converted value wouldn't fit
188 LL | foo::<u64>(x_usize.try_into().unwrap());
189 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
191 error[E0308]: mismatched types
192 --> $DIR/numeric-cast.rs:69:16
194 LL | foo::<u64>(x_u32);
197 | expected u64, found u32
198 | help: you can convert an `u32` to `u64`: `x_u32.into()`
200 error[E0308]: mismatched types
201 --> $DIR/numeric-cast.rs:71:16
203 LL | foo::<u64>(x_u16);
206 | expected u64, found u16
207 | help: you can convert an `u16` to `u64`: `x_u16.into()`
209 error[E0308]: mismatched types
210 --> $DIR/numeric-cast.rs:73:16
212 LL | foo::<u64>(x_u8);
215 | expected u64, found u8
216 | help: you can convert an `u8` to `u64`: `x_u8.into()`
218 error[E0308]: mismatched types
219 --> $DIR/numeric-cast.rs:75:16
221 LL | foo::<u64>(x_isize);
222 | ^^^^^^^ expected u64, found isize
223 help: you can convert an `isize` to `u64` or panic if it the converted value wouldn't fit
225 LL | foo::<u64>(x_isize.try_into().unwrap());
226 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
228 error[E0308]: mismatched types
229 --> $DIR/numeric-cast.rs:77:16
231 LL | foo::<u64>(x_i64);
232 | ^^^^^ expected u64, found i64
233 help: you can convert an `i64` to `u64` or panic if it the converted value wouldn't fit
235 LL | foo::<u64>(x_i64.try_into().unwrap());
236 | ^^^^^^^^^^^^^^^^^^^^^^^^^
238 error[E0308]: mismatched types
239 --> $DIR/numeric-cast.rs:79:16
241 LL | foo::<u64>(x_i32);
242 | ^^^^^ expected u64, found i32
243 help: you can convert an `i32` to `u64` or panic if it the converted value wouldn't fit
245 LL | foo::<u64>(x_i32.try_into().unwrap());
246 | ^^^^^^^^^^^^^^^^^^^^^^^^^
248 error[E0308]: mismatched types
249 --> $DIR/numeric-cast.rs:81:16
251 LL | foo::<u64>(x_i16);
252 | ^^^^^ expected u64, found i16
253 help: you can convert an `i16` to `u64` or panic if it the converted value wouldn't fit
255 LL | foo::<u64>(x_i16.try_into().unwrap());
256 | ^^^^^^^^^^^^^^^^^^^^^^^^^
258 error[E0308]: mismatched types
259 --> $DIR/numeric-cast.rs:83:16
261 LL | foo::<u64>(x_i8);
262 | ^^^^ expected u64, found i8
263 help: you can convert an `i8` to `u64` or panic if it the converted value wouldn't fit
265 LL | foo::<u64>(x_i8.try_into().unwrap());
266 | ^^^^^^^^^^^^^^^^^^^^^^^^
268 error[E0308]: mismatched types
269 --> $DIR/numeric-cast.rs:88:16
271 LL | foo::<i64>(x_usize);
272 | ^^^^^^^ expected i64, found usize
273 help: you can convert an `usize` to `i64` or panic if it the converted value wouldn't fit
275 LL | foo::<i64>(x_usize.try_into().unwrap());
276 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
278 error[E0308]: mismatched types
279 --> $DIR/numeric-cast.rs:90:16
281 LL | foo::<i64>(x_u64);
282 | ^^^^^ expected i64, found u64
283 help: you can convert an `u64` to `i64` or panic if it the converted value wouldn't fit
285 LL | foo::<i64>(x_u64.try_into().unwrap());
286 | ^^^^^^^^^^^^^^^^^^^^^^^^^
288 error[E0308]: mismatched types
289 --> $DIR/numeric-cast.rs:92:16
291 LL | foo::<i64>(x_u32);
292 | ^^^^^ expected i64, found u32
293 help: you can convert an `u32` to `i64` or panic if it the converted value wouldn't fit
295 LL | foo::<i64>(x_u32.try_into().unwrap());
296 | ^^^^^^^^^^^^^^^^^^^^^^^^^
298 error[E0308]: mismatched types
299 --> $DIR/numeric-cast.rs:94:16
301 LL | foo::<i64>(x_u16);
302 | ^^^^^ expected i64, found u16
303 help: you can convert an `u16` to `i64` or panic if it the converted value wouldn't fit
305 LL | foo::<i64>(x_u16.try_into().unwrap());
306 | ^^^^^^^^^^^^^^^^^^^^^^^^^
308 error[E0308]: mismatched types
309 --> $DIR/numeric-cast.rs:96:16
311 LL | foo::<i64>(x_u8);
312 | ^^^^ expected i64, found u8
313 help: you can convert an `u8` to `i64` or panic if it the converted value wouldn't fit
315 LL | foo::<i64>(x_u8.try_into().unwrap());
316 | ^^^^^^^^^^^^^^^^^^^^^^^^
318 error[E0308]: mismatched types
319 --> $DIR/numeric-cast.rs:98:16
321 LL | foo::<i64>(x_isize);
322 | ^^^^^^^ expected i64, found isize
323 help: you can convert an `isize` to `i64` or panic if it the converted value wouldn't fit
325 LL | foo::<i64>(x_isize.try_into().unwrap());
326 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
328 error[E0308]: mismatched types
329 --> $DIR/numeric-cast.rs:101:16
331 LL | foo::<i64>(x_i32);
334 | expected i64, found i32
335 | help: you can convert an `i32` to `i64`: `x_i32.into()`
337 error[E0308]: mismatched types
338 --> $DIR/numeric-cast.rs:103:16
340 LL | foo::<i64>(x_i16);
343 | expected i64, found i16
344 | help: you can convert an `i16` to `i64`: `x_i16.into()`
346 error[E0308]: mismatched types
347 --> $DIR/numeric-cast.rs:105:16
349 LL | foo::<i64>(x_i8);
352 | expected i64, found i8
353 | help: you can convert an `i8` to `i64`: `x_i8.into()`
355 error[E0308]: mismatched types
356 --> $DIR/numeric-cast.rs:110:16
358 LL | foo::<u32>(x_usize);
359 | ^^^^^^^ expected u32, found usize
360 help: you can convert an `usize` to `u32` or panic if it the converted value wouldn't fit
362 LL | foo::<u32>(x_usize.try_into().unwrap());
363 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
365 error[E0308]: mismatched types
366 --> $DIR/numeric-cast.rs:112:16
368 LL | foo::<u32>(x_u64);
369 | ^^^^^ expected u32, found u64
370 help: you can convert an `u64` to `u32` or panic if it the converted value wouldn't fit
372 LL | foo::<u32>(x_u64.try_into().unwrap());
373 | ^^^^^^^^^^^^^^^^^^^^^^^^^
375 error[E0308]: mismatched types
376 --> $DIR/numeric-cast.rs:115:16
378 LL | foo::<u32>(x_u16);
381 | expected u32, found u16
382 | help: you can convert an `u16` to `u32`: `x_u16.into()`
384 error[E0308]: mismatched types
385 --> $DIR/numeric-cast.rs:117:16
387 LL | foo::<u32>(x_u8);
390 | expected u32, found u8
391 | help: you can convert an `u8` to `u32`: `x_u8.into()`
393 error[E0308]: mismatched types
394 --> $DIR/numeric-cast.rs:119:16
396 LL | foo::<u32>(x_isize);
397 | ^^^^^^^ expected u32, found isize
398 help: you can convert an `isize` to `u32` or panic if it the converted value wouldn't fit
400 LL | foo::<u32>(x_isize.try_into().unwrap());
401 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
403 error[E0308]: mismatched types
404 --> $DIR/numeric-cast.rs:121:16
406 LL | foo::<u32>(x_i64);
407 | ^^^^^ expected u32, found i64
408 help: you can convert an `i64` to `u32` or panic if it the converted value wouldn't fit
410 LL | foo::<u32>(x_i64.try_into().unwrap());
411 | ^^^^^^^^^^^^^^^^^^^^^^^^^
413 error[E0308]: mismatched types
414 --> $DIR/numeric-cast.rs:123:16
416 LL | foo::<u32>(x_i32);
417 | ^^^^^ expected u32, found i32
418 help: you can convert an `i32` to `u32` or panic if it the converted value wouldn't fit
420 LL | foo::<u32>(x_i32.try_into().unwrap());
421 | ^^^^^^^^^^^^^^^^^^^^^^^^^
423 error[E0308]: mismatched types
424 --> $DIR/numeric-cast.rs:125:16
426 LL | foo::<u32>(x_i16);
427 | ^^^^^ expected u32, found i16
428 help: you can convert an `i16` to `u32` or panic if it the converted value wouldn't fit
430 LL | foo::<u32>(x_i16.try_into().unwrap());
431 | ^^^^^^^^^^^^^^^^^^^^^^^^^
433 error[E0308]: mismatched types
434 --> $DIR/numeric-cast.rs:127:16
436 LL | foo::<u32>(x_i8);
437 | ^^^^ expected u32, found i8
438 help: you can convert an `i8` to `u32` or panic if it the converted value wouldn't fit
440 LL | foo::<u32>(x_i8.try_into().unwrap());
441 | ^^^^^^^^^^^^^^^^^^^^^^^^
443 error[E0308]: mismatched types
444 --> $DIR/numeric-cast.rs:132:16
446 LL | foo::<i32>(x_usize);
447 | ^^^^^^^ expected i32, found usize
448 help: you can convert an `usize` to `i32` or panic if it the converted value wouldn't fit
450 LL | foo::<i32>(x_usize.try_into().unwrap());
451 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
453 error[E0308]: mismatched types
454 --> $DIR/numeric-cast.rs:134:16
456 LL | foo::<i32>(x_u64);
457 | ^^^^^ expected i32, found u64
458 help: you can convert an `u64` to `i32` or panic if it the converted value wouldn't fit
460 LL | foo::<i32>(x_u64.try_into().unwrap());
461 | ^^^^^^^^^^^^^^^^^^^^^^^^^
463 error[E0308]: mismatched types
464 --> $DIR/numeric-cast.rs:136:16
466 LL | foo::<i32>(x_u32);
467 | ^^^^^ expected i32, found u32
468 help: you can convert an `u32` to `i32` or panic if it the converted value wouldn't fit
470 LL | foo::<i32>(x_u32.try_into().unwrap());
471 | ^^^^^^^^^^^^^^^^^^^^^^^^^
473 error[E0308]: mismatched types
474 --> $DIR/numeric-cast.rs:138:16
476 LL | foo::<i32>(x_u16);
477 | ^^^^^ expected i32, found u16
478 help: you can convert an `u16` to `i32` or panic if it the converted value wouldn't fit
480 LL | foo::<i32>(x_u16.try_into().unwrap());
481 | ^^^^^^^^^^^^^^^^^^^^^^^^^
483 error[E0308]: mismatched types
484 --> $DIR/numeric-cast.rs:140:16
486 LL | foo::<i32>(x_u8);
487 | ^^^^ expected i32, found u8
488 help: you can convert an `u8` to `i32` or panic if it the converted value wouldn't fit
490 LL | foo::<i32>(x_u8.try_into().unwrap());
491 | ^^^^^^^^^^^^^^^^^^^^^^^^
493 error[E0308]: mismatched types
494 --> $DIR/numeric-cast.rs:142:16
496 LL | foo::<i32>(x_isize);
497 | ^^^^^^^ expected i32, found isize
498 help: you can convert an `isize` to `i32` or panic if it the converted value wouldn't fit
500 LL | foo::<i32>(x_isize.try_into().unwrap());
501 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
503 error[E0308]: mismatched types
504 --> $DIR/numeric-cast.rs:144:16
506 LL | foo::<i32>(x_i64);
507 | ^^^^^ expected i32, found i64
508 help: you can convert an `i64` to `i32` or panic if it the converted value wouldn't fit
510 LL | foo::<i32>(x_i64.try_into().unwrap());
511 | ^^^^^^^^^^^^^^^^^^^^^^^^^
513 error[E0308]: mismatched types
514 --> $DIR/numeric-cast.rs:147:16
516 LL | foo::<i32>(x_i16);
519 | expected i32, found i16
520 | help: you can convert an `i16` to `i32`: `x_i16.into()`
522 error[E0308]: mismatched types
523 --> $DIR/numeric-cast.rs:149:16
525 LL | foo::<i32>(x_i8);
528 | expected i32, found i8
529 | help: you can convert an `i8` to `i32`: `x_i8.into()`
531 error[E0308]: mismatched types
532 --> $DIR/numeric-cast.rs:154:16
534 LL | foo::<u16>(x_usize);
535 | ^^^^^^^ expected u16, found usize
536 help: you can convert an `usize` to `u16` or panic if it the converted value wouldn't fit
538 LL | foo::<u16>(x_usize.try_into().unwrap());
539 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
541 error[E0308]: mismatched types
542 --> $DIR/numeric-cast.rs:156:16
544 LL | foo::<u16>(x_u64);
545 | ^^^^^ expected u16, found u64
546 help: you can convert an `u64` to `u16` or panic if it the converted value wouldn't fit
548 LL | foo::<u16>(x_u64.try_into().unwrap());
549 | ^^^^^^^^^^^^^^^^^^^^^^^^^
551 error[E0308]: mismatched types
552 --> $DIR/numeric-cast.rs:158:16
554 LL | foo::<u16>(x_u32);
555 | ^^^^^ expected u16, found u32
556 help: you can convert an `u32` to `u16` or panic if it the converted value wouldn't fit
558 LL | foo::<u16>(x_u32.try_into().unwrap());
559 | ^^^^^^^^^^^^^^^^^^^^^^^^^
561 error[E0308]: mismatched types
562 --> $DIR/numeric-cast.rs:161:16
564 LL | foo::<u16>(x_u8);
567 | expected u16, found u8
568 | help: you can convert an `u8` to `u16`: `x_u8.into()`
570 error[E0308]: mismatched types
571 --> $DIR/numeric-cast.rs:163:16
573 LL | foo::<u16>(x_isize);
574 | ^^^^^^^ expected u16, found isize
575 help: you can convert an `isize` to `u16` or panic if it the converted value wouldn't fit
577 LL | foo::<u16>(x_isize.try_into().unwrap());
578 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
580 error[E0308]: mismatched types
581 --> $DIR/numeric-cast.rs:165:16
583 LL | foo::<u16>(x_i64);
584 | ^^^^^ expected u16, found i64
585 help: you can convert an `i64` to `u16` or panic if it the converted value wouldn't fit
587 LL | foo::<u16>(x_i64.try_into().unwrap());
588 | ^^^^^^^^^^^^^^^^^^^^^^^^^
590 error[E0308]: mismatched types
591 --> $DIR/numeric-cast.rs:167:16
593 LL | foo::<u16>(x_i32);
594 | ^^^^^ expected u16, found i32
595 help: you can convert an `i32` to `u16` or panic if it the converted value wouldn't fit
597 LL | foo::<u16>(x_i32.try_into().unwrap());
598 | ^^^^^^^^^^^^^^^^^^^^^^^^^
600 error[E0308]: mismatched types
601 --> $DIR/numeric-cast.rs:169:16
603 LL | foo::<u16>(x_i16);
604 | ^^^^^ expected u16, found i16
605 help: you can convert an `i16` to `u16` or panic if it the converted value wouldn't fit
607 LL | foo::<u16>(x_i16.try_into().unwrap());
608 | ^^^^^^^^^^^^^^^^^^^^^^^^^
610 error[E0308]: mismatched types
611 --> $DIR/numeric-cast.rs:171:16
613 LL | foo::<u16>(x_i8);
614 | ^^^^ expected u16, found i8
615 help: you can convert an `i8` to `u16` or panic if it the converted value wouldn't fit
617 LL | foo::<u16>(x_i8.try_into().unwrap());
618 | ^^^^^^^^^^^^^^^^^^^^^^^^
620 error[E0308]: mismatched types
621 --> $DIR/numeric-cast.rs:176:16
623 LL | foo::<i16>(x_usize);
624 | ^^^^^^^ expected i16, found usize
625 help: you can convert an `usize` to `i16` or panic if it the converted value wouldn't fit
627 LL | foo::<i16>(x_usize.try_into().unwrap());
628 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
630 error[E0308]: mismatched types
631 --> $DIR/numeric-cast.rs:178:16
633 LL | foo::<i16>(x_u64);
634 | ^^^^^ expected i16, found u64
635 help: you can convert an `u64` to `i16` or panic if it the converted value wouldn't fit
637 LL | foo::<i16>(x_u64.try_into().unwrap());
638 | ^^^^^^^^^^^^^^^^^^^^^^^^^
640 error[E0308]: mismatched types
641 --> $DIR/numeric-cast.rs:180:16
643 LL | foo::<i16>(x_u32);
644 | ^^^^^ expected i16, found u32
645 help: you can convert an `u32` to `i16` or panic if it the converted value wouldn't fit
647 LL | foo::<i16>(x_u32.try_into().unwrap());
648 | ^^^^^^^^^^^^^^^^^^^^^^^^^
650 error[E0308]: mismatched types
651 --> $DIR/numeric-cast.rs:182:16
653 LL | foo::<i16>(x_u16);
654 | ^^^^^ expected i16, found u16
655 help: you can convert an `u16` to `i16` or panic if it the converted value wouldn't fit
657 LL | foo::<i16>(x_u16.try_into().unwrap());
658 | ^^^^^^^^^^^^^^^^^^^^^^^^^
660 error[E0308]: mismatched types
661 --> $DIR/numeric-cast.rs:184:16
663 LL | foo::<i16>(x_u8);
664 | ^^^^ expected i16, found u8
665 help: you can convert an `u8` to `i16` or panic if it the converted value wouldn't fit
667 LL | foo::<i16>(x_u8.try_into().unwrap());
668 | ^^^^^^^^^^^^^^^^^^^^^^^^
670 error[E0308]: mismatched types
671 --> $DIR/numeric-cast.rs:186:16
673 LL | foo::<i16>(x_isize);
674 | ^^^^^^^ expected i16, found isize
675 help: you can convert an `isize` to `i16` or panic if it the converted value wouldn't fit
677 LL | foo::<i16>(x_isize.try_into().unwrap());
678 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
680 error[E0308]: mismatched types
681 --> $DIR/numeric-cast.rs:188:16
683 LL | foo::<i16>(x_i64);
684 | ^^^^^ expected i16, found i64
685 help: you can convert an `i64` to `i16` or panic if it the converted value wouldn't fit
687 LL | foo::<i16>(x_i64.try_into().unwrap());
688 | ^^^^^^^^^^^^^^^^^^^^^^^^^
690 error[E0308]: mismatched types
691 --> $DIR/numeric-cast.rs:190:16
693 LL | foo::<i16>(x_i32);
694 | ^^^^^ expected i16, found i32
695 help: you can convert an `i32` to `i16` or panic if it the converted value wouldn't fit
697 LL | foo::<i16>(x_i32.try_into().unwrap());
698 | ^^^^^^^^^^^^^^^^^^^^^^^^^
700 error[E0308]: mismatched types
701 --> $DIR/numeric-cast.rs:193:16
703 LL | foo::<i16>(x_i8);
706 | expected i16, found i8
707 | help: you can convert an `i8` to `i16`: `x_i8.into()`
709 error[E0308]: mismatched types
710 --> $DIR/numeric-cast.rs:198:15
712 LL | foo::<u8>(x_usize);
713 | ^^^^^^^ expected u8, found usize
714 help: you can convert an `usize` to `u8` or panic if it the converted value wouldn't fit
716 LL | foo::<u8>(x_usize.try_into().unwrap());
717 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
719 error[E0308]: mismatched types
720 --> $DIR/numeric-cast.rs:200:15
722 LL | foo::<u8>(x_u64);
723 | ^^^^^ expected u8, found u64
724 help: you can convert an `u64` to `u8` or panic if it the converted value wouldn't fit
726 LL | foo::<u8>(x_u64.try_into().unwrap());
727 | ^^^^^^^^^^^^^^^^^^^^^^^^^
729 error[E0308]: mismatched types
730 --> $DIR/numeric-cast.rs:202:15
732 LL | foo::<u8>(x_u32);
733 | ^^^^^ expected u8, found u32
734 help: you can convert an `u32` to `u8` or panic if it the converted value wouldn't fit
736 LL | foo::<u8>(x_u32.try_into().unwrap());
737 | ^^^^^^^^^^^^^^^^^^^^^^^^^
739 error[E0308]: mismatched types
740 --> $DIR/numeric-cast.rs:204:15
742 LL | foo::<u8>(x_u16);
743 | ^^^^^ expected u8, found u16
744 help: you can convert an `u16` to `u8` or panic if it the converted value wouldn't fit
746 LL | foo::<u8>(x_u16.try_into().unwrap());
747 | ^^^^^^^^^^^^^^^^^^^^^^^^^
749 error[E0308]: mismatched types
750 --> $DIR/numeric-cast.rs:207:15
752 LL | foo::<u8>(x_isize);
753 | ^^^^^^^ expected u8, found isize
754 help: you can convert an `isize` to `u8` or panic if it the converted value wouldn't fit
756 LL | foo::<u8>(x_isize.try_into().unwrap());
757 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
759 error[E0308]: mismatched types
760 --> $DIR/numeric-cast.rs:209:15
762 LL | foo::<u8>(x_i64);
763 | ^^^^^ expected u8, found i64
764 help: you can convert an `i64` to `u8` or panic if it the converted value wouldn't fit
766 LL | foo::<u8>(x_i64.try_into().unwrap());
767 | ^^^^^^^^^^^^^^^^^^^^^^^^^
769 error[E0308]: mismatched types
770 --> $DIR/numeric-cast.rs:211:15
772 LL | foo::<u8>(x_i32);
773 | ^^^^^ expected u8, found i32
774 help: you can convert an `i32` to `u8` or panic if it the converted value wouldn't fit
776 LL | foo::<u8>(x_i32.try_into().unwrap());
777 | ^^^^^^^^^^^^^^^^^^^^^^^^^
779 error[E0308]: mismatched types
780 --> $DIR/numeric-cast.rs:213:15
782 LL | foo::<u8>(x_i16);
783 | ^^^^^ expected u8, found i16
784 help: you can convert an `i16` to `u8` or panic if it the converted value wouldn't fit
786 LL | foo::<u8>(x_i16.try_into().unwrap());
787 | ^^^^^^^^^^^^^^^^^^^^^^^^^
789 error[E0308]: mismatched types
790 --> $DIR/numeric-cast.rs:215:15
792 LL | foo::<u8>(x_i8);
793 | ^^^^ expected u8, found i8
794 help: you can convert an `i8` to `u8` or panic if it the converted value wouldn't fit
796 LL | foo::<u8>(x_i8.try_into().unwrap());
797 | ^^^^^^^^^^^^^^^^^^^^^^^^
799 error[E0308]: mismatched types
800 --> $DIR/numeric-cast.rs:220:15
802 LL | foo::<i8>(x_usize);
803 | ^^^^^^^ expected i8, found usize
804 help: you can convert an `usize` to `i8` or panic if it the converted value wouldn't fit
806 LL | foo::<i8>(x_usize.try_into().unwrap());
807 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
809 error[E0308]: mismatched types
810 --> $DIR/numeric-cast.rs:222:15
812 LL | foo::<i8>(x_u64);
813 | ^^^^^ expected i8, found u64
814 help: you can convert an `u64` to `i8` or panic if it the converted value wouldn't fit
816 LL | foo::<i8>(x_u64.try_into().unwrap());
817 | ^^^^^^^^^^^^^^^^^^^^^^^^^
819 error[E0308]: mismatched types
820 --> $DIR/numeric-cast.rs:224:15
822 LL | foo::<i8>(x_u32);
823 | ^^^^^ expected i8, found u32
824 help: you can convert an `u32` to `i8` or panic if it the converted value wouldn't fit
826 LL | foo::<i8>(x_u32.try_into().unwrap());
827 | ^^^^^^^^^^^^^^^^^^^^^^^^^
829 error[E0308]: mismatched types
830 --> $DIR/numeric-cast.rs:226:15
832 LL | foo::<i8>(x_u16);
833 | ^^^^^ expected i8, found u16
834 help: you can convert an `u16` to `i8` or panic if it the converted value wouldn't fit
836 LL | foo::<i8>(x_u16.try_into().unwrap());
837 | ^^^^^^^^^^^^^^^^^^^^^^^^^
839 error[E0308]: mismatched types
840 --> $DIR/numeric-cast.rs:228:15
842 LL | foo::<i8>(x_u8);
843 | ^^^^ expected i8, found u8
844 help: you can convert an `u8` to `i8` or panic if it the converted value wouldn't fit
846 LL | foo::<i8>(x_u8.try_into().unwrap());
847 | ^^^^^^^^^^^^^^^^^^^^^^^^
849 error[E0308]: mismatched types
850 --> $DIR/numeric-cast.rs:230:15
852 LL | foo::<i8>(x_isize);
853 | ^^^^^^^ expected i8, found isize
854 help: you can convert an `isize` to `i8` or panic if it the converted value wouldn't fit
856 LL | foo::<i8>(x_isize.try_into().unwrap());
857 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
859 error[E0308]: mismatched types
860 --> $DIR/numeric-cast.rs:232:15
862 LL | foo::<i8>(x_i64);
863 | ^^^^^ expected i8, found i64
864 help: you can convert an `i64` to `i8` or panic if it the converted value wouldn't fit
866 LL | foo::<i8>(x_i64.try_into().unwrap());
867 | ^^^^^^^^^^^^^^^^^^^^^^^^^
869 error[E0308]: mismatched types
870 --> $DIR/numeric-cast.rs:234:15
872 LL | foo::<i8>(x_i32);
873 | ^^^^^ expected i8, found i32
874 help: you can convert an `i32` to `i8` or panic if it the converted value wouldn't fit
876 LL | foo::<i8>(x_i32.try_into().unwrap());
877 | ^^^^^^^^^^^^^^^^^^^^^^^^^
879 error[E0308]: mismatched types
880 --> $DIR/numeric-cast.rs:236:15
882 LL | foo::<i8>(x_i16);
883 | ^^^^^ expected i8, found i16
884 help: you can convert an `i16` to `i8` or panic if it the converted value wouldn't fit
886 LL | foo::<i8>(x_i16.try_into().unwrap());
887 | ^^^^^^^^^^^^^^^^^^^^^^^^^
889 error[E0308]: mismatched types
890 --> $DIR/numeric-cast.rs:242:16
892 LL | foo::<f64>(x_usize);
893 | ^^^^^^^ expected f64, found usize
894 help: you can cast an `usize to `f64`, producing the floating point representation of the integer,
895 | rounded if necessary
896 LL | foo::<f64>(x_usize as f64);
899 error[E0308]: mismatched types
900 --> $DIR/numeric-cast.rs:244:16
902 LL | foo::<f64>(x_u64);
903 | ^^^^^ expected f64, found u64
904 help: you can cast an `u64 to `f64`, producing the floating point representation of the integer,
905 | rounded if necessary
906 LL | foo::<f64>(x_u64 as f64);
909 error[E0308]: mismatched types
910 --> $DIR/numeric-cast.rs:246:16
912 LL | foo::<f64>(x_u32);
913 | ^^^^^ expected f64, found u32
914 help: you can convert an `u32` to `f64`, producing the floating point representation of the integer
916 LL | foo::<f64>(x_u32.into());
919 error[E0308]: mismatched types
920 --> $DIR/numeric-cast.rs:248:16
922 LL | foo::<f64>(x_u16);
923 | ^^^^^ expected f64, found u16
924 help: you can convert an `u16` to `f64`, producing the floating point representation of the integer
926 LL | foo::<f64>(x_u16.into());
929 error[E0308]: mismatched types
930 --> $DIR/numeric-cast.rs:250:16
932 LL | foo::<f64>(x_u8);
933 | ^^^^ expected f64, found u8
934 help: you can convert an `u8` to `f64`, producing the floating point representation of the integer
936 LL | foo::<f64>(x_u8.into());
939 error[E0308]: mismatched types
940 --> $DIR/numeric-cast.rs:252:16
942 LL | foo::<f64>(x_isize);
943 | ^^^^^^^ expected f64, found isize
944 help: you can convert an `isize` to `f64`, producing the floating point representation of the integer, rounded if necessary
946 LL | foo::<f64>(x_isize as f64);
949 error[E0308]: mismatched types
950 --> $DIR/numeric-cast.rs:254:16
952 LL | foo::<f64>(x_i64);
953 | ^^^^^ expected f64, found i64
954 help: you can convert an `i64` to `f64`, producing the floating point representation of the integer, rounded if necessary
956 LL | foo::<f64>(x_i64 as f64);
959 error[E0308]: mismatched types
960 --> $DIR/numeric-cast.rs:256:16
962 LL | foo::<f64>(x_i32);
963 | ^^^^^ expected f64, found i32
964 help: you can convert an `i32` to `f64`, producing the floating point representation of the integer
966 LL | foo::<f64>(x_i32.into());
969 error[E0308]: mismatched types
970 --> $DIR/numeric-cast.rs:258:16
972 LL | foo::<f64>(x_i16);
973 | ^^^^^ expected f64, found i16
974 help: you can convert an `i16` to `f64`, producing the floating point representation of the integer
976 LL | foo::<f64>(x_i16.into());
979 error[E0308]: mismatched types
980 --> $DIR/numeric-cast.rs:260:16
982 LL | foo::<f64>(x_i8);
983 | ^^^^ expected f64, found i8
984 help: you can convert an `i8` to `f64`, producing the floating point representation of the integer
986 LL | foo::<f64>(x_i8.into());
989 error[E0308]: mismatched types
990 --> $DIR/numeric-cast.rs:263:16
992 LL | foo::<f64>(x_f32);
995 | expected f64, found f32
996 | help: you can convert an `f32` to `f64`: `x_f32.into()`
998 error[E0308]: mismatched types
999 --> $DIR/numeric-cast.rs:266:16
1001 LL | foo::<f32>(x_usize);
1002 | ^^^^^^^ expected f32, found usize
1003 help: you can cast an `usize to `f32`, producing the floating point representation of the integer,
1004 | rounded if necessary
1005 LL | foo::<f32>(x_usize as f32);
1008 error[E0308]: mismatched types
1009 --> $DIR/numeric-cast.rs:268:16
1011 LL | foo::<f32>(x_u64);
1012 | ^^^^^ expected f32, found u64
1013 help: you can cast an `u64 to `f32`, producing the floating point representation of the integer,
1014 | rounded if necessary
1015 LL | foo::<f32>(x_u64 as f32);
1018 error[E0308]: mismatched types
1019 --> $DIR/numeric-cast.rs:270:16
1021 LL | foo::<f32>(x_u32);
1022 | ^^^^^ expected f32, found u32
1023 help: you can cast an `u32 to `f32`, producing the floating point representation of the integer,
1024 | rounded if necessary
1025 LL | foo::<f32>(x_u32 as f32);
1028 error[E0308]: mismatched types
1029 --> $DIR/numeric-cast.rs:272:16
1031 LL | foo::<f32>(x_u16);
1032 | ^^^^^ expected f32, found u16
1033 help: you can convert an `u16` to `f32`, producing the floating point representation of the integer
1035 LL | foo::<f32>(x_u16.into());
1038 error[E0308]: mismatched types
1039 --> $DIR/numeric-cast.rs:274:16
1041 LL | foo::<f32>(x_u8);
1042 | ^^^^ expected f32, found u8
1043 help: you can convert an `u8` to `f32`, producing the floating point representation of the integer
1045 LL | foo::<f32>(x_u8.into());
1048 error[E0308]: mismatched types
1049 --> $DIR/numeric-cast.rs:276:16
1051 LL | foo::<f32>(x_isize);
1052 | ^^^^^^^ expected f32, found isize
1053 help: you can convert an `isize` to `f32`, producing the floating point representation of the integer, rounded if necessary
1055 LL | foo::<f32>(x_isize as f32);
1058 error[E0308]: mismatched types
1059 --> $DIR/numeric-cast.rs:278:16
1061 LL | foo::<f32>(x_i64);
1062 | ^^^^^ expected f32, found i64
1063 help: you can convert an `i64` to `f32`, producing the floating point representation of the integer, rounded if necessary
1065 LL | foo::<f32>(x_i64 as f32);
1068 error[E0308]: mismatched types
1069 --> $DIR/numeric-cast.rs:280:16
1071 LL | foo::<f32>(x_i32);
1072 | ^^^^^ expected f32, found i32
1073 help: you can convert an `i32` to `f32`, producing the floating point representation of the integer, rounded if necessary
1075 LL | foo::<f32>(x_i32 as f32);
1078 error[E0308]: mismatched types
1079 --> $DIR/numeric-cast.rs:282:16
1081 LL | foo::<f32>(x_i16);
1082 | ^^^^^ expected f32, found i16
1083 help: you can convert an `i16` to `f32`, producing the floating point representation of the integer
1085 LL | foo::<f32>(x_i16.into());
1088 error[E0308]: mismatched types
1089 --> $DIR/numeric-cast.rs:284:16
1091 LL | foo::<f32>(x_i8);
1092 | ^^^^ expected f32, found i8
1093 help: you can convert an `i8` to `f32`, producing the floating point representation of the integer
1095 LL | foo::<f32>(x_i8.into());
1098 error[E0308]: mismatched types
1099 --> $DIR/numeric-cast.rs:289:16
1101 LL | foo::<u32>(x_u8 as u16);
1104 | expected u32, found u16
1105 | help: you can convert an `u16` to `u32`: `(x_u8 as u16).into()`
1107 error[E0308]: mismatched types
1108 --> $DIR/numeric-cast.rs:291:16
1110 LL | foo::<i32>(-x_i8);
1113 | expected i32, found i8
1114 | help: you can convert an `i8` to `i32`: `(-x_i8).into()`
1116 error: aborting due to 113 previous errors
1118 For more information about this error, try `rustc --explain E0308`.