fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
37.0 KiB1208 linesraw
1error[E0308]: mismatched types
2  --> $DIR/numeric-cast.rs:23:18
3   |
4LL |     foo::<usize>(x_u64);
5   |                  ^^^^^ expected `usize`, found `u64`
6   |
7help: you can convert an `u64` to `usize` and panic if the converted value wouldn't fit
8   |
9LL |     foo::<usize>(x_u64.try_into().unwrap());
10   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
11
12error[E0308]: mismatched types
13  --> $DIR/numeric-cast.rs:25:18
14   |
15LL |     foo::<usize>(x_u32);
16   |                  ^^^^^ expected `usize`, found `u32`
17   |
18help: you can convert an `u32` to `usize` and panic if the converted value wouldn't fit
19   |
20LL |     foo::<usize>(x_u32.try_into().unwrap());
21   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
22
23error[E0308]: mismatched types
24  --> $DIR/numeric-cast.rs:27:18
25   |
26LL |     foo::<usize>(x_u16);
27   |                  ^^^^^
28   |                  |
29   |                  expected `usize`, found `u16`
30   |                  help: you can convert an `u16` to `usize`: `x_u16.into()`
31
32error[E0308]: mismatched types
33  --> $DIR/numeric-cast.rs:29:18
34   |
35LL |     foo::<usize>(x_u8);
36   |                  ^^^^
37   |                  |
38   |                  expected `usize`, found `u8`
39   |                  help: you can convert an `u8` to `usize`: `x_u8.into()`
40
41error[E0308]: mismatched types
42  --> $DIR/numeric-cast.rs:31:18
43   |
44LL |     foo::<usize>(x_isize);
45   |                  ^^^^^^^ expected `usize`, found `isize`
46   |
47help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
48   |
49LL |     foo::<usize>(x_isize.try_into().unwrap());
50   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
51
52error[E0308]: mismatched types
53  --> $DIR/numeric-cast.rs:33:18
54   |
55LL |     foo::<usize>(x_i64);
56   |                  ^^^^^ expected `usize`, found `i64`
57   |
58help: you can convert an `i64` to `usize` and panic if the converted value wouldn't fit
59   |
60LL |     foo::<usize>(x_i64.try_into().unwrap());
61   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
62
63error[E0308]: mismatched types
64  --> $DIR/numeric-cast.rs:35:18
65   |
66LL |     foo::<usize>(x_i32);
67   |                  ^^^^^ expected `usize`, found `i32`
68   |
69help: you can convert an `i32` to `usize` and panic if the converted value wouldn't fit
70   |
71LL |     foo::<usize>(x_i32.try_into().unwrap());
72   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
73
74error[E0308]: mismatched types
75  --> $DIR/numeric-cast.rs:37:18
76   |
77LL |     foo::<usize>(x_i16);
78   |                  ^^^^^ expected `usize`, found `i16`
79   |
80help: you can convert an `i16` to `usize` and panic if the converted value wouldn't fit
81   |
82LL |     foo::<usize>(x_i16.try_into().unwrap());
83   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
84
85error[E0308]: mismatched types
86  --> $DIR/numeric-cast.rs:39:18
87   |
88LL |     foo::<usize>(x_i8);
89   |                  ^^^^ expected `usize`, found `i8`
90   |
91help: you can convert an `i8` to `usize` and panic if the converted value wouldn't fit
92   |
93LL |     foo::<usize>(x_i8.try_into().unwrap());
94   |                  ^^^^^^^^^^^^^^^^^^^^^^^^
95
96error[E0308]: mismatched types
97  --> $DIR/numeric-cast.rs:44:18
98   |
99LL |     foo::<isize>(x_usize);
100   |                  ^^^^^^^ expected `isize`, found `usize`
101   |
102help: you can convert an `usize` to `isize` and panic if the converted value wouldn't fit
103   |
104LL |     foo::<isize>(x_usize.try_into().unwrap());
105   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
106
107error[E0308]: mismatched types
108  --> $DIR/numeric-cast.rs:46:18
109   |
110LL |     foo::<isize>(x_u64);
111   |                  ^^^^^ expected `isize`, found `u64`
112   |
113help: you can convert an `u64` to `isize` and panic if the converted value wouldn't fit
114   |
115LL |     foo::<isize>(x_u64.try_into().unwrap());
116   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
117
118error[E0308]: mismatched types
119  --> $DIR/numeric-cast.rs:48:18
120   |
121LL |     foo::<isize>(x_u32);
122   |                  ^^^^^ expected `isize`, found `u32`
123   |
124help: you can convert an `u32` to `isize` and panic if the converted value wouldn't fit
125   |
126LL |     foo::<isize>(x_u32.try_into().unwrap());
127   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
128
129error[E0308]: mismatched types
130  --> $DIR/numeric-cast.rs:50:18
131   |
132LL |     foo::<isize>(x_u16);
133   |                  ^^^^^ expected `isize`, found `u16`
134   |
135help: you can convert an `u16` to `isize` and panic if the converted value wouldn't fit
136   |
137LL |     foo::<isize>(x_u16.try_into().unwrap());
138   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
139
140error[E0308]: mismatched types
141  --> $DIR/numeric-cast.rs:52:18
142   |
143LL |     foo::<isize>(x_u8);
144   |                  ^^^^ expected `isize`, found `u8`
145   |
146help: you can convert an `u8` to `isize` and panic if the converted value wouldn't fit
147   |
148LL |     foo::<isize>(x_u8.try_into().unwrap());
149   |                  ^^^^^^^^^^^^^^^^^^^^^^^^
150
151error[E0308]: mismatched types
152  --> $DIR/numeric-cast.rs:55:18
153   |
154LL |     foo::<isize>(x_i64);
155   |                  ^^^^^ expected `isize`, found `i64`
156   |
157help: you can convert an `i64` to `isize` and panic if the converted value wouldn't fit
158   |
159LL |     foo::<isize>(x_i64.try_into().unwrap());
160   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
161
162error[E0308]: mismatched types
163  --> $DIR/numeric-cast.rs:57:18
164   |
165LL |     foo::<isize>(x_i32);
166   |                  ^^^^^ expected `isize`, found `i32`
167   |
168help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit
169   |
170LL |     foo::<isize>(x_i32.try_into().unwrap());
171   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^
172
173error[E0308]: mismatched types
174  --> $DIR/numeric-cast.rs:59:18
175   |
176LL |     foo::<isize>(x_i16);
177   |                  ^^^^^
178   |                  |
179   |                  expected `isize`, found `i16`
180   |                  help: you can convert an `i16` to `isize`: `x_i16.into()`
181
182error[E0308]: mismatched types
183  --> $DIR/numeric-cast.rs:61:18
184   |
185LL |     foo::<isize>(x_i8);
186   |                  ^^^^
187   |                  |
188   |                  expected `isize`, found `i8`
189   |                  help: you can convert an `i8` to `isize`: `x_i8.into()`
190
191error[E0308]: mismatched types
192  --> $DIR/numeric-cast.rs:66:16
193   |
194LL |     foo::<u64>(x_usize);
195   |                ^^^^^^^ expected `u64`, found `usize`
196   |
197help: you can convert an `usize` to `u64` and panic if the converted value wouldn't fit
198   |
199LL |     foo::<u64>(x_usize.try_into().unwrap());
200   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
201
202error[E0308]: mismatched types
203  --> $DIR/numeric-cast.rs:69:16
204   |
205LL |     foo::<u64>(x_u32);
206   |                ^^^^^
207   |                |
208   |                expected `u64`, found `u32`
209   |                help: you can convert an `u32` to `u64`: `x_u32.into()`
210
211error[E0308]: mismatched types
212  --> $DIR/numeric-cast.rs:71:16
213   |
214LL |     foo::<u64>(x_u16);
215   |                ^^^^^
216   |                |
217   |                expected `u64`, found `u16`
218   |                help: you can convert an `u16` to `u64`: `x_u16.into()`
219
220error[E0308]: mismatched types
221  --> $DIR/numeric-cast.rs:73:16
222   |
223LL |     foo::<u64>(x_u8);
224   |                ^^^^
225   |                |
226   |                expected `u64`, found `u8`
227   |                help: you can convert an `u8` to `u64`: `x_u8.into()`
228
229error[E0308]: mismatched types
230  --> $DIR/numeric-cast.rs:75:16
231   |
232LL |     foo::<u64>(x_isize);
233   |                ^^^^^^^ expected `u64`, found `isize`
234   |
235help: you can convert an `isize` to `u64` and panic if the converted value wouldn't fit
236   |
237LL |     foo::<u64>(x_isize.try_into().unwrap());
238   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
239
240error[E0308]: mismatched types
241  --> $DIR/numeric-cast.rs:77:16
242   |
243LL |     foo::<u64>(x_i64);
244   |                ^^^^^ expected `u64`, found `i64`
245   |
246help: you can convert an `i64` to `u64` and panic if the converted value wouldn't fit
247   |
248LL |     foo::<u64>(x_i64.try_into().unwrap());
249   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
250
251error[E0308]: mismatched types
252  --> $DIR/numeric-cast.rs:79:16
253   |
254LL |     foo::<u64>(x_i32);
255   |                ^^^^^ expected `u64`, found `i32`
256   |
257help: you can convert an `i32` to `u64` and panic if the converted value wouldn't fit
258   |
259LL |     foo::<u64>(x_i32.try_into().unwrap());
260   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
261
262error[E0308]: mismatched types
263  --> $DIR/numeric-cast.rs:81:16
264   |
265LL |     foo::<u64>(x_i16);
266   |                ^^^^^ expected `u64`, found `i16`
267   |
268help: you can convert an `i16` to `u64` and panic if the converted value wouldn't fit
269   |
270LL |     foo::<u64>(x_i16.try_into().unwrap());
271   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
272
273error[E0308]: mismatched types
274  --> $DIR/numeric-cast.rs:83:16
275   |
276LL |     foo::<u64>(x_i8);
277   |                ^^^^ expected `u64`, found `i8`
278   |
279help: you can convert an `i8` to `u64` and panic if the converted value wouldn't fit
280   |
281LL |     foo::<u64>(x_i8.try_into().unwrap());
282   |                ^^^^^^^^^^^^^^^^^^^^^^^^
283
284error[E0308]: mismatched types
285  --> $DIR/numeric-cast.rs:88:16
286   |
287LL |     foo::<i64>(x_usize);
288   |                ^^^^^^^ expected `i64`, found `usize`
289   |
290help: you can convert an `usize` to `i64` and panic if the converted value wouldn't fit
291   |
292LL |     foo::<i64>(x_usize.try_into().unwrap());
293   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
294
295error[E0308]: mismatched types
296  --> $DIR/numeric-cast.rs:90:16
297   |
298LL |     foo::<i64>(x_u64);
299   |                ^^^^^ expected `i64`, found `u64`
300   |
301help: you can convert an `u64` to `i64` and panic if the converted value wouldn't fit
302   |
303LL |     foo::<i64>(x_u64.try_into().unwrap());
304   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
305
306error[E0308]: mismatched types
307  --> $DIR/numeric-cast.rs:92:16
308   |
309LL |     foo::<i64>(x_u32);
310   |                ^^^^^ expected `i64`, found `u32`
311   |
312help: you can convert an `u32` to `i64` and panic if the converted value wouldn't fit
313   |
314LL |     foo::<i64>(x_u32.try_into().unwrap());
315   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
316
317error[E0308]: mismatched types
318  --> $DIR/numeric-cast.rs:94:16
319   |
320LL |     foo::<i64>(x_u16);
321   |                ^^^^^ expected `i64`, found `u16`
322   |
323help: you can convert an `u16` to `i64` and panic if the converted value wouldn't fit
324   |
325LL |     foo::<i64>(x_u16.try_into().unwrap());
326   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
327
328error[E0308]: mismatched types
329  --> $DIR/numeric-cast.rs:96:16
330   |
331LL |     foo::<i64>(x_u8);
332   |                ^^^^ expected `i64`, found `u8`
333   |
334help: you can convert an `u8` to `i64` and panic if the converted value wouldn't fit
335   |
336LL |     foo::<i64>(x_u8.try_into().unwrap());
337   |                ^^^^^^^^^^^^^^^^^^^^^^^^
338
339error[E0308]: mismatched types
340  --> $DIR/numeric-cast.rs:98:16
341   |
342LL |     foo::<i64>(x_isize);
343   |                ^^^^^^^ expected `i64`, found `isize`
344   |
345help: you can convert an `isize` to `i64` and panic if the converted value wouldn't fit
346   |
347LL |     foo::<i64>(x_isize.try_into().unwrap());
348   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
349
350error[E0308]: mismatched types
351  --> $DIR/numeric-cast.rs:101:16
352   |
353LL |     foo::<i64>(x_i32);
354   |                ^^^^^
355   |                |
356   |                expected `i64`, found `i32`
357   |                help: you can convert an `i32` to `i64`: `x_i32.into()`
358
359error[E0308]: mismatched types
360  --> $DIR/numeric-cast.rs:103:16
361   |
362LL |     foo::<i64>(x_i16);
363   |                ^^^^^
364   |                |
365   |                expected `i64`, found `i16`
366   |                help: you can convert an `i16` to `i64`: `x_i16.into()`
367
368error[E0308]: mismatched types
369  --> $DIR/numeric-cast.rs:105:16
370   |
371LL |     foo::<i64>(x_i8);
372   |                ^^^^
373   |                |
374   |                expected `i64`, found `i8`
375   |                help: you can convert an `i8` to `i64`: `x_i8.into()`
376
377error[E0308]: mismatched types
378  --> $DIR/numeric-cast.rs:110:16
379   |
380LL |     foo::<u32>(x_usize);
381   |                ^^^^^^^ expected `u32`, found `usize`
382   |
383help: you can convert an `usize` to `u32` and panic if the converted value wouldn't fit
384   |
385LL |     foo::<u32>(x_usize.try_into().unwrap());
386   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
387
388error[E0308]: mismatched types
389  --> $DIR/numeric-cast.rs:112:16
390   |
391LL |     foo::<u32>(x_u64);
392   |                ^^^^^ expected `u32`, found `u64`
393   |
394help: you can convert an `u64` to `u32` and panic if the converted value wouldn't fit
395   |
396LL |     foo::<u32>(x_u64.try_into().unwrap());
397   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
398
399error[E0308]: mismatched types
400  --> $DIR/numeric-cast.rs:115:16
401   |
402LL |     foo::<u32>(x_u16);
403   |                ^^^^^
404   |                |
405   |                expected `u32`, found `u16`
406   |                help: you can convert an `u16` to `u32`: `x_u16.into()`
407
408error[E0308]: mismatched types
409  --> $DIR/numeric-cast.rs:117:16
410   |
411LL |     foo::<u32>(x_u8);
412   |                ^^^^
413   |                |
414   |                expected `u32`, found `u8`
415   |                help: you can convert an `u8` to `u32`: `x_u8.into()`
416
417error[E0308]: mismatched types
418  --> $DIR/numeric-cast.rs:119:16
419   |
420LL |     foo::<u32>(x_isize);
421   |                ^^^^^^^ expected `u32`, found `isize`
422   |
423help: you can convert an `isize` to `u32` and panic if the converted value wouldn't fit
424   |
425LL |     foo::<u32>(x_isize.try_into().unwrap());
426   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
427
428error[E0308]: mismatched types
429  --> $DIR/numeric-cast.rs:121:16
430   |
431LL |     foo::<u32>(x_i64);
432   |                ^^^^^ expected `u32`, found `i64`
433   |
434help: you can convert an `i64` to `u32` and panic if the converted value wouldn't fit
435   |
436LL |     foo::<u32>(x_i64.try_into().unwrap());
437   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
438
439error[E0308]: mismatched types
440  --> $DIR/numeric-cast.rs:123:16
441   |
442LL |     foo::<u32>(x_i32);
443   |                ^^^^^ expected `u32`, found `i32`
444   |
445help: you can convert an `i32` to `u32` and panic if the converted value wouldn't fit
446   |
447LL |     foo::<u32>(x_i32.try_into().unwrap());
448   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
449
450error[E0308]: mismatched types
451  --> $DIR/numeric-cast.rs:125:16
452   |
453LL |     foo::<u32>(x_i16);
454   |                ^^^^^ expected `u32`, found `i16`
455   |
456help: you can convert an `i16` to `u32` and panic if the converted value wouldn't fit
457   |
458LL |     foo::<u32>(x_i16.try_into().unwrap());
459   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
460
461error[E0308]: mismatched types
462  --> $DIR/numeric-cast.rs:127:16
463   |
464LL |     foo::<u32>(x_i8);
465   |                ^^^^ expected `u32`, found `i8`
466   |
467help: you can convert an `i8` to `u32` and panic if the converted value wouldn't fit
468   |
469LL |     foo::<u32>(x_i8.try_into().unwrap());
470   |                ^^^^^^^^^^^^^^^^^^^^^^^^
471
472error[E0308]: mismatched types
473  --> $DIR/numeric-cast.rs:132:16
474   |
475LL |     foo::<i32>(x_usize);
476   |                ^^^^^^^ expected `i32`, found `usize`
477   |
478help: you can convert an `usize` to `i32` and panic if the converted value wouldn't fit
479   |
480LL |     foo::<i32>(x_usize.try_into().unwrap());
481   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
482
483error[E0308]: mismatched types
484  --> $DIR/numeric-cast.rs:134:16
485   |
486LL |     foo::<i32>(x_u64);
487   |                ^^^^^ expected `i32`, found `u64`
488   |
489help: you can convert an `u64` to `i32` and panic if the converted value wouldn't fit
490   |
491LL |     foo::<i32>(x_u64.try_into().unwrap());
492   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
493
494error[E0308]: mismatched types
495  --> $DIR/numeric-cast.rs:136:16
496   |
497LL |     foo::<i32>(x_u32);
498   |                ^^^^^ expected `i32`, found `u32`
499   |
500help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit
501   |
502LL |     foo::<i32>(x_u32.try_into().unwrap());
503   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
504
505error[E0308]: mismatched types
506  --> $DIR/numeric-cast.rs:138:16
507   |
508LL |     foo::<i32>(x_u16);
509   |                ^^^^^ expected `i32`, found `u16`
510   |
511help: you can convert an `u16` to `i32` and panic if the converted value wouldn't fit
512   |
513LL |     foo::<i32>(x_u16.try_into().unwrap());
514   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
515
516error[E0308]: mismatched types
517  --> $DIR/numeric-cast.rs:140:16
518   |
519LL |     foo::<i32>(x_u8);
520   |                ^^^^ expected `i32`, found `u8`
521   |
522help: you can convert an `u8` to `i32` and panic if the converted value wouldn't fit
523   |
524LL |     foo::<i32>(x_u8.try_into().unwrap());
525   |                ^^^^^^^^^^^^^^^^^^^^^^^^
526
527error[E0308]: mismatched types
528  --> $DIR/numeric-cast.rs:142:16
529   |
530LL |     foo::<i32>(x_isize);
531   |                ^^^^^^^ expected `i32`, found `isize`
532   |
533help: you can convert an `isize` to `i32` and panic if the converted value wouldn't fit
534   |
535LL |     foo::<i32>(x_isize.try_into().unwrap());
536   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
537
538error[E0308]: mismatched types
539  --> $DIR/numeric-cast.rs:144:16
540   |
541LL |     foo::<i32>(x_i64);
542   |                ^^^^^ expected `i32`, found `i64`
543   |
544help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
545   |
546LL |     foo::<i32>(x_i64.try_into().unwrap());
547   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
548
549error[E0308]: mismatched types
550  --> $DIR/numeric-cast.rs:147:16
551   |
552LL |     foo::<i32>(x_i16);
553   |                ^^^^^
554   |                |
555   |                expected `i32`, found `i16`
556   |                help: you can convert an `i16` to `i32`: `x_i16.into()`
557
558error[E0308]: mismatched types
559  --> $DIR/numeric-cast.rs:149:16
560   |
561LL |     foo::<i32>(x_i8);
562   |                ^^^^
563   |                |
564   |                expected `i32`, found `i8`
565   |                help: you can convert an `i8` to `i32`: `x_i8.into()`
566
567error[E0308]: mismatched types
568  --> $DIR/numeric-cast.rs:154:16
569   |
570LL |     foo::<u16>(x_usize);
571   |                ^^^^^^^ expected `u16`, found `usize`
572   |
573help: you can convert an `usize` to `u16` and panic if the converted value wouldn't fit
574   |
575LL |     foo::<u16>(x_usize.try_into().unwrap());
576   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
577
578error[E0308]: mismatched types
579  --> $DIR/numeric-cast.rs:156:16
580   |
581LL |     foo::<u16>(x_u64);
582   |                ^^^^^ expected `u16`, found `u64`
583   |
584help: you can convert an `u64` to `u16` and panic if the converted value wouldn't fit
585   |
586LL |     foo::<u16>(x_u64.try_into().unwrap());
587   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
588
589error[E0308]: mismatched types
590  --> $DIR/numeric-cast.rs:158:16
591   |
592LL |     foo::<u16>(x_u32);
593   |                ^^^^^ expected `u16`, found `u32`
594   |
595help: you can convert an `u32` to `u16` and panic if the converted value wouldn't fit
596   |
597LL |     foo::<u16>(x_u32.try_into().unwrap());
598   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
599
600error[E0308]: mismatched types
601  --> $DIR/numeric-cast.rs:161:16
602   |
603LL |     foo::<u16>(x_u8);
604   |                ^^^^
605   |                |
606   |                expected `u16`, found `u8`
607   |                help: you can convert an `u8` to `u16`: `x_u8.into()`
608
609error[E0308]: mismatched types
610  --> $DIR/numeric-cast.rs:163:16
611   |
612LL |     foo::<u16>(x_isize);
613   |                ^^^^^^^ expected `u16`, found `isize`
614   |
615help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit
616   |
617LL |     foo::<u16>(x_isize.try_into().unwrap());
618   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
619
620error[E0308]: mismatched types
621  --> $DIR/numeric-cast.rs:165:16
622   |
623LL |     foo::<u16>(x_i64);
624   |                ^^^^^ expected `u16`, found `i64`
625   |
626help: you can convert an `i64` to `u16` and panic if the converted value wouldn't fit
627   |
628LL |     foo::<u16>(x_i64.try_into().unwrap());
629   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
630
631error[E0308]: mismatched types
632  --> $DIR/numeric-cast.rs:167:16
633   |
634LL |     foo::<u16>(x_i32);
635   |                ^^^^^ expected `u16`, found `i32`
636   |
637help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
638   |
639LL |     foo::<u16>(x_i32.try_into().unwrap());
640   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
641
642error[E0308]: mismatched types
643  --> $DIR/numeric-cast.rs:169:16
644   |
645LL |     foo::<u16>(x_i16);
646   |                ^^^^^ expected `u16`, found `i16`
647   |
648help: you can convert an `i16` to `u16` and panic if the converted value wouldn't fit
649   |
650LL |     foo::<u16>(x_i16.try_into().unwrap());
651   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
652
653error[E0308]: mismatched types
654  --> $DIR/numeric-cast.rs:171:16
655   |
656LL |     foo::<u16>(x_i8);
657   |                ^^^^ expected `u16`, found `i8`
658   |
659help: you can convert an `i8` to `u16` and panic if the converted value wouldn't fit
660   |
661LL |     foo::<u16>(x_i8.try_into().unwrap());
662   |                ^^^^^^^^^^^^^^^^^^^^^^^^
663
664error[E0308]: mismatched types
665  --> $DIR/numeric-cast.rs:176:16
666   |
667LL |     foo::<i16>(x_usize);
668   |                ^^^^^^^ expected `i16`, found `usize`
669   |
670help: you can convert an `usize` to `i16` and panic if the converted value wouldn't fit
671   |
672LL |     foo::<i16>(x_usize.try_into().unwrap());
673   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
674
675error[E0308]: mismatched types
676  --> $DIR/numeric-cast.rs:178:16
677   |
678LL |     foo::<i16>(x_u64);
679   |                ^^^^^ expected `i16`, found `u64`
680   |
681help: you can convert an `u64` to `i16` and panic if the converted value wouldn't fit
682   |
683LL |     foo::<i16>(x_u64.try_into().unwrap());
684   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
685
686error[E0308]: mismatched types
687  --> $DIR/numeric-cast.rs:180:16
688   |
689LL |     foo::<i16>(x_u32);
690   |                ^^^^^ expected `i16`, found `u32`
691   |
692help: you can convert an `u32` to `i16` and panic if the converted value wouldn't fit
693   |
694LL |     foo::<i16>(x_u32.try_into().unwrap());
695   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
696
697error[E0308]: mismatched types
698  --> $DIR/numeric-cast.rs:182:16
699   |
700LL |     foo::<i16>(x_u16);
701   |                ^^^^^ expected `i16`, found `u16`
702   |
703help: you can convert an `u16` to `i16` and panic if the converted value wouldn't fit
704   |
705LL |     foo::<i16>(x_u16.try_into().unwrap());
706   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
707
708error[E0308]: mismatched types
709  --> $DIR/numeric-cast.rs:184:16
710   |
711LL |     foo::<i16>(x_u8);
712   |                ^^^^ expected `i16`, found `u8`
713   |
714help: you can convert an `u8` to `i16` and panic if the converted value wouldn't fit
715   |
716LL |     foo::<i16>(x_u8.try_into().unwrap());
717   |                ^^^^^^^^^^^^^^^^^^^^^^^^
718
719error[E0308]: mismatched types
720  --> $DIR/numeric-cast.rs:186:16
721   |
722LL |     foo::<i16>(x_isize);
723   |                ^^^^^^^ expected `i16`, found `isize`
724   |
725help: you can convert an `isize` to `i16` and panic if the converted value wouldn't fit
726   |
727LL |     foo::<i16>(x_isize.try_into().unwrap());
728   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
729
730error[E0308]: mismatched types
731  --> $DIR/numeric-cast.rs:188:16
732   |
733LL |     foo::<i16>(x_i64);
734   |                ^^^^^ expected `i16`, found `i64`
735   |
736help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
737   |
738LL |     foo::<i16>(x_i64.try_into().unwrap());
739   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
740
741error[E0308]: mismatched types
742  --> $DIR/numeric-cast.rs:190:16
743   |
744LL |     foo::<i16>(x_i32);
745   |                ^^^^^ expected `i16`, found `i32`
746   |
747help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
748   |
749LL |     foo::<i16>(x_i32.try_into().unwrap());
750   |                ^^^^^^^^^^^^^^^^^^^^^^^^^
751
752error[E0308]: mismatched types
753  --> $DIR/numeric-cast.rs:193:16
754   |
755LL |     foo::<i16>(x_i8);
756   |                ^^^^
757   |                |
758   |                expected `i16`, found `i8`
759   |                help: you can convert an `i8` to `i16`: `x_i8.into()`
760
761error[E0308]: mismatched types
762  --> $DIR/numeric-cast.rs:198:15
763   |
764LL |     foo::<u8>(x_usize);
765   |               ^^^^^^^ expected `u8`, found `usize`
766   |
767help: you can convert an `usize` to `u8` and panic if the converted value wouldn't fit
768   |
769LL |     foo::<u8>(x_usize.try_into().unwrap());
770   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
771
772error[E0308]: mismatched types
773  --> $DIR/numeric-cast.rs:200:15
774   |
775LL |     foo::<u8>(x_u64);
776   |               ^^^^^ expected `u8`, found `u64`
777   |
778help: you can convert an `u64` to `u8` and panic if the converted value wouldn't fit
779   |
780LL |     foo::<u8>(x_u64.try_into().unwrap());
781   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
782
783error[E0308]: mismatched types
784  --> $DIR/numeric-cast.rs:202:15
785   |
786LL |     foo::<u8>(x_u32);
787   |               ^^^^^ expected `u8`, found `u32`
788   |
789help: you can convert an `u32` to `u8` and panic if the converted value wouldn't fit
790   |
791LL |     foo::<u8>(x_u32.try_into().unwrap());
792   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
793
794error[E0308]: mismatched types
795  --> $DIR/numeric-cast.rs:204:15
796   |
797LL |     foo::<u8>(x_u16);
798   |               ^^^^^ expected `u8`, found `u16`
799   |
800help: you can convert an `u16` to `u8` and panic if the converted value wouldn't fit
801   |
802LL |     foo::<u8>(x_u16.try_into().unwrap());
803   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
804
805error[E0308]: mismatched types
806  --> $DIR/numeric-cast.rs:207:15
807   |
808LL |     foo::<u8>(x_isize);
809   |               ^^^^^^^ expected `u8`, found `isize`
810   |
811help: you can convert an `isize` to `u8` and panic if the converted value wouldn't fit
812   |
813LL |     foo::<u8>(x_isize.try_into().unwrap());
814   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
815
816error[E0308]: mismatched types
817  --> $DIR/numeric-cast.rs:209:15
818   |
819LL |     foo::<u8>(x_i64);
820   |               ^^^^^ expected `u8`, found `i64`
821   |
822help: you can convert an `i64` to `u8` and panic if the converted value wouldn't fit
823   |
824LL |     foo::<u8>(x_i64.try_into().unwrap());
825   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
826
827error[E0308]: mismatched types
828  --> $DIR/numeric-cast.rs:211:15
829   |
830LL |     foo::<u8>(x_i32);
831   |               ^^^^^ expected `u8`, found `i32`
832   |
833help: you can convert an `i32` to `u8` and panic if the converted value wouldn't fit
834   |
835LL |     foo::<u8>(x_i32.try_into().unwrap());
836   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
837
838error[E0308]: mismatched types
839  --> $DIR/numeric-cast.rs:213:15
840   |
841LL |     foo::<u8>(x_i16);
842   |               ^^^^^ expected `u8`, found `i16`
843   |
844help: you can convert an `i16` to `u8` and panic if the converted value wouldn't fit
845   |
846LL |     foo::<u8>(x_i16.try_into().unwrap());
847   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
848
849error[E0308]: mismatched types
850  --> $DIR/numeric-cast.rs:215:15
851   |
852LL |     foo::<u8>(x_i8);
853   |               ^^^^ expected `u8`, found `i8`
854   |
855help: you can convert an `i8` to `u8` and panic if the converted value wouldn't fit
856   |
857LL |     foo::<u8>(x_i8.try_into().unwrap());
858   |               ^^^^^^^^^^^^^^^^^^^^^^^^
859
860error[E0308]: mismatched types
861  --> $DIR/numeric-cast.rs:220:15
862   |
863LL |     foo::<i8>(x_usize);
864   |               ^^^^^^^ expected `i8`, found `usize`
865   |
866help: you can convert an `usize` to `i8` and panic if the converted value wouldn't fit
867   |
868LL |     foo::<i8>(x_usize.try_into().unwrap());
869   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
870
871error[E0308]: mismatched types
872  --> $DIR/numeric-cast.rs:222:15
873   |
874LL |     foo::<i8>(x_u64);
875   |               ^^^^^ expected `i8`, found `u64`
876   |
877help: you can convert an `u64` to `i8` and panic if the converted value wouldn't fit
878   |
879LL |     foo::<i8>(x_u64.try_into().unwrap());
880   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
881
882error[E0308]: mismatched types
883  --> $DIR/numeric-cast.rs:224:15
884   |
885LL |     foo::<i8>(x_u32);
886   |               ^^^^^ expected `i8`, found `u32`
887   |
888help: you can convert an `u32` to `i8` and panic if the converted value wouldn't fit
889   |
890LL |     foo::<i8>(x_u32.try_into().unwrap());
891   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
892
893error[E0308]: mismatched types
894  --> $DIR/numeric-cast.rs:226:15
895   |
896LL |     foo::<i8>(x_u16);
897   |               ^^^^^ expected `i8`, found `u16`
898   |
899help: you can convert an `u16` to `i8` and panic if the converted value wouldn't fit
900   |
901LL |     foo::<i8>(x_u16.try_into().unwrap());
902   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
903
904error[E0308]: mismatched types
905  --> $DIR/numeric-cast.rs:228:15
906   |
907LL |     foo::<i8>(x_u8);
908   |               ^^^^ expected `i8`, found `u8`
909   |
910help: you can convert an `u8` to `i8` and panic if the converted value wouldn't fit
911   |
912LL |     foo::<i8>(x_u8.try_into().unwrap());
913   |               ^^^^^^^^^^^^^^^^^^^^^^^^
914
915error[E0308]: mismatched types
916  --> $DIR/numeric-cast.rs:230:15
917   |
918LL |     foo::<i8>(x_isize);
919   |               ^^^^^^^ expected `i8`, found `isize`
920   |
921help: you can convert an `isize` to `i8` and panic if the converted value wouldn't fit
922   |
923LL |     foo::<i8>(x_isize.try_into().unwrap());
924   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
925
926error[E0308]: mismatched types
927  --> $DIR/numeric-cast.rs:232:15
928   |
929LL |     foo::<i8>(x_i64);
930   |               ^^^^^ expected `i8`, found `i64`
931   |
932help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
933   |
934LL |     foo::<i8>(x_i64.try_into().unwrap());
935   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
936
937error[E0308]: mismatched types
938  --> $DIR/numeric-cast.rs:234:15
939   |
940LL |     foo::<i8>(x_i32);
941   |               ^^^^^ expected `i8`, found `i32`
942   |
943help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
944   |
945LL |     foo::<i8>(x_i32.try_into().unwrap());
946   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
947
948error[E0308]: mismatched types
949  --> $DIR/numeric-cast.rs:236:15
950   |
951LL |     foo::<i8>(x_i16);
952   |               ^^^^^ expected `i8`, found `i16`
953   |
954help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
955   |
956LL |     foo::<i8>(x_i16.try_into().unwrap());
957   |               ^^^^^^^^^^^^^^^^^^^^^^^^^
958
959error[E0308]: mismatched types
960  --> $DIR/numeric-cast.rs:242:16
961   |
962LL |     foo::<f64>(x_usize);
963   |                ^^^^^^^ expected `f64`, found `usize`
964   |
965help: you can cast an `usize to `f64`, producing the floating point representation of the integer,
966   |                                              rounded if necessary
967LL |     foo::<f64>(x_usize as f64);
968   |                ^^^^^^^^^^^^^^
969
970error[E0308]: mismatched types
971  --> $DIR/numeric-cast.rs:244:16
972   |
973LL |     foo::<f64>(x_u64);
974   |                ^^^^^ expected `f64`, found `u64`
975   |
976help: you can cast an `u64 to `f64`, producing the floating point representation of the integer,
977   |                                              rounded if necessary
978LL |     foo::<f64>(x_u64 as f64);
979   |                ^^^^^^^^^^^^
980
981error[E0308]: mismatched types
982  --> $DIR/numeric-cast.rs:246:16
983   |
984LL |     foo::<f64>(x_u32);
985   |                ^^^^^ expected `f64`, found `u32`
986   |
987help: you can convert an `u32` to `f64`, producing the floating point representation of the integer
988   |
989LL |     foo::<f64>(x_u32.into());
990   |                ^^^^^^^^^^^^
991
992error[E0308]: mismatched types
993  --> $DIR/numeric-cast.rs:248:16
994   |
995LL |     foo::<f64>(x_u16);
996   |                ^^^^^ expected `f64`, found `u16`
997   |
998help: you can convert an `u16` to `f64`, producing the floating point representation of the integer
999   |
1000LL |     foo::<f64>(x_u16.into());
1001   |                ^^^^^^^^^^^^
1002
1003error[E0308]: mismatched types
1004  --> $DIR/numeric-cast.rs:250:16
1005   |
1006LL |     foo::<f64>(x_u8);
1007   |                ^^^^ expected `f64`, found `u8`
1008   |
1009help: you can convert an `u8` to `f64`, producing the floating point representation of the integer
1010   |
1011LL |     foo::<f64>(x_u8.into());
1012   |                ^^^^^^^^^^^
1013
1014error[E0308]: mismatched types
1015  --> $DIR/numeric-cast.rs:252:16
1016   |
1017LL |     foo::<f64>(x_isize);
1018   |                ^^^^^^^ expected `f64`, found `isize`
1019   |
1020help: you can convert an `isize` to `f64`, producing the floating point representation of the integer, rounded if necessary
1021   |
1022LL |     foo::<f64>(x_isize as f64);
1023   |                ^^^^^^^^^^^^^^
1024
1025error[E0308]: mismatched types
1026  --> $DIR/numeric-cast.rs:254:16
1027   |
1028LL |     foo::<f64>(x_i64);
1029   |                ^^^^^ expected `f64`, found `i64`
1030   |
1031help: you can convert an `i64` to `f64`, producing the floating point representation of the integer, rounded if necessary
1032   |
1033LL |     foo::<f64>(x_i64 as f64);
1034   |                ^^^^^^^^^^^^
1035
1036error[E0308]: mismatched types
1037  --> $DIR/numeric-cast.rs:256:16
1038   |
1039LL |     foo::<f64>(x_i32);
1040   |                ^^^^^ expected `f64`, found `i32`
1041   |
1042help: you can convert an `i32` to `f64`, producing the floating point representation of the integer
1043   |
1044LL |     foo::<f64>(x_i32.into());
1045   |                ^^^^^^^^^^^^
1046
1047error[E0308]: mismatched types
1048  --> $DIR/numeric-cast.rs:258:16
1049   |
1050LL |     foo::<f64>(x_i16);
1051   |                ^^^^^ expected `f64`, found `i16`
1052   |
1053help: you can convert an `i16` to `f64`, producing the floating point representation of the integer
1054   |
1055LL |     foo::<f64>(x_i16.into());
1056   |                ^^^^^^^^^^^^
1057
1058error[E0308]: mismatched types
1059  --> $DIR/numeric-cast.rs:260:16
1060   |
1061LL |     foo::<f64>(x_i8);
1062   |                ^^^^ expected `f64`, found `i8`
1063   |
1064help: you can convert an `i8` to `f64`, producing the floating point representation of the integer
1065   |
1066LL |     foo::<f64>(x_i8.into());
1067   |                ^^^^^^^^^^^
1068
1069error[E0308]: mismatched types
1070  --> $DIR/numeric-cast.rs:263:16
1071   |
1072LL |     foo::<f64>(x_f32);
1073   |                ^^^^^
1074   |                |
1075   |                expected `f64`, found `f32`
1076   |                help: you can convert an `f32` to `f64`: `x_f32.into()`
1077
1078error[E0308]: mismatched types
1079  --> $DIR/numeric-cast.rs:266:16
1080   |
1081LL |     foo::<f32>(x_usize);
1082   |                ^^^^^^^ expected `f32`, found `usize`
1083   |
1084help: you can cast an `usize to `f32`, producing the floating point representation of the integer,
1085   |                                              rounded if necessary
1086LL |     foo::<f32>(x_usize as f32);
1087   |                ^^^^^^^^^^^^^^
1088
1089error[E0308]: mismatched types
1090  --> $DIR/numeric-cast.rs:268:16
1091   |
1092LL |     foo::<f32>(x_u64);
1093   |                ^^^^^ expected `f32`, found `u64`
1094   |
1095help: you can cast an `u64 to `f32`, producing the floating point representation of the integer,
1096   |                                              rounded if necessary
1097LL |     foo::<f32>(x_u64 as f32);
1098   |                ^^^^^^^^^^^^
1099
1100error[E0308]: mismatched types
1101  --> $DIR/numeric-cast.rs:270:16
1102   |
1103LL |     foo::<f32>(x_u32);
1104   |                ^^^^^ expected `f32`, found `u32`
1105   |
1106help: you can cast an `u32 to `f32`, producing the floating point representation of the integer,
1107   |                                              rounded if necessary
1108LL |     foo::<f32>(x_u32 as f32);
1109   |                ^^^^^^^^^^^^
1110
1111error[E0308]: mismatched types
1112  --> $DIR/numeric-cast.rs:272:16
1113   |
1114LL |     foo::<f32>(x_u16);
1115   |                ^^^^^ expected `f32`, found `u16`
1116   |
1117help: you can convert an `u16` to `f32`, producing the floating point representation of the integer
1118   |
1119LL |     foo::<f32>(x_u16.into());
1120   |                ^^^^^^^^^^^^
1121
1122error[E0308]: mismatched types
1123  --> $DIR/numeric-cast.rs:274:16
1124   |
1125LL |     foo::<f32>(x_u8);
1126   |                ^^^^ expected `f32`, found `u8`
1127   |
1128help: you can convert an `u8` to `f32`, producing the floating point representation of the integer
1129   |
1130LL |     foo::<f32>(x_u8.into());
1131   |                ^^^^^^^^^^^
1132
1133error[E0308]: mismatched types
1134  --> $DIR/numeric-cast.rs:276:16
1135   |
1136LL |     foo::<f32>(x_isize);
1137   |                ^^^^^^^ expected `f32`, found `isize`
1138   |
1139help: you can convert an `isize` to `f32`, producing the floating point representation of the integer, rounded if necessary
1140   |
1141LL |     foo::<f32>(x_isize as f32);
1142   |                ^^^^^^^^^^^^^^
1143
1144error[E0308]: mismatched types
1145  --> $DIR/numeric-cast.rs:278:16
1146   |
1147LL |     foo::<f32>(x_i64);
1148   |                ^^^^^ expected `f32`, found `i64`
1149   |
1150help: you can convert an `i64` to `f32`, producing the floating point representation of the integer, rounded if necessary
1151   |
1152LL |     foo::<f32>(x_i64 as f32);
1153   |                ^^^^^^^^^^^^
1154
1155error[E0308]: mismatched types
1156  --> $DIR/numeric-cast.rs:280:16
1157   |
1158LL |     foo::<f32>(x_i32);
1159   |                ^^^^^ expected `f32`, found `i32`
1160   |
1161help: you can convert an `i32` to `f32`, producing the floating point representation of the integer, rounded if necessary
1162   |
1163LL |     foo::<f32>(x_i32 as f32);
1164   |                ^^^^^^^^^^^^
1165
1166error[E0308]: mismatched types
1167  --> $DIR/numeric-cast.rs:282:16
1168   |
1169LL |     foo::<f32>(x_i16);
1170   |                ^^^^^ expected `f32`, found `i16`
1171   |
1172help: you can convert an `i16` to `f32`, producing the floating point representation of the integer
1173   |
1174LL |     foo::<f32>(x_i16.into());
1175   |                ^^^^^^^^^^^^
1176
1177error[E0308]: mismatched types
1178  --> $DIR/numeric-cast.rs:284:16
1179   |
1180LL |     foo::<f32>(x_i8);
1181   |                ^^^^ expected `f32`, found `i8`
1182   |
1183help: you can convert an `i8` to `f32`, producing the floating point representation of the integer
1184   |
1185LL |     foo::<f32>(x_i8.into());
1186   |                ^^^^^^^^^^^
1187
1188error[E0308]: mismatched types
1189  --> $DIR/numeric-cast.rs:289:16
1190   |
1191LL |     foo::<u32>(x_u8 as u16);
1192   |                ^^^^^^^^^^^
1193   |                |
1194   |                expected `u32`, found `u16`
1195   |                help: you can convert an `u16` to `u32`: `(x_u8 as u16).into()`
1196
1197error[E0308]: mismatched types
1198  --> $DIR/numeric-cast.rs:291:16
1199   |
1200LL |     foo::<i32>(-x_i8);
1201   |                ^^^^^
1202   |                |
1203   |                expected `i32`, found `i8`
1204   |                help: you can convert an `i8` to `i32`: `(-x_i8).into()`
1205
1206error: aborting due to 113 previous errors
1207
1208For more information about this error, try `rustc --explain E0308`.