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