fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

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