fork/rust

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

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

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