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