]> git.lizzy.rs Git - rust.git/blob - src/test/ui/integer-literal-suffix-inference.stderr
Rollup merge of #88090 - nbdd0121:inference, r=nikomatsakis
[rust.git] / src / test / ui / integer-literal-suffix-inference.stderr
1 error[E0308]: mismatched types
2   --> $DIR/integer-literal-suffix-inference.rs:38:11
3    |
4 LL |     id_i8(a16);
5    |           ^^^ expected `i8`, found `i16`
6    |
7 help: you can convert an `i16` to an `i8` and panic if the converted value doesn't fit
8    |
9 LL |     id_i8(a16.try_into().unwrap());
10    |              ++++++++++++++++++++
11
12 error[E0308]: mismatched types
13   --> $DIR/integer-literal-suffix-inference.rs:41:11
14    |
15 LL |     id_i8(a32);
16    |           ^^^ expected `i8`, found `i32`
17    |
18 help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit
19    |
20 LL |     id_i8(a32.try_into().unwrap());
21    |              ++++++++++++++++++++
22
23 error[E0308]: mismatched types
24   --> $DIR/integer-literal-suffix-inference.rs:44:11
25    |
26 LL |     id_i8(a64);
27    |           ^^^ expected `i8`, found `i64`
28    |
29 help: you can convert an `i64` to an `i8` and panic if the converted value doesn't fit
30    |
31 LL |     id_i8(a64.try_into().unwrap());
32    |              ++++++++++++++++++++
33
34 error[E0308]: mismatched types
35   --> $DIR/integer-literal-suffix-inference.rs:47:11
36    |
37 LL |     id_i8(asize);
38    |           ^^^^^ expected `i8`, found `isize`
39    |
40 help: you can convert an `isize` to an `i8` and panic if the converted value doesn't fit
41    |
42 LL |     id_i8(asize.try_into().unwrap());
43    |                ++++++++++++++++++++
44
45 error[E0308]: mismatched types
46   --> $DIR/integer-literal-suffix-inference.rs:51:12
47    |
48 LL |     id_i16(a8);
49    |            ^^ expected `i16`, found `i8`
50    |
51 help: you can convert an `i8` to an `i16`
52    |
53 LL |     id_i16(a8.into());
54    |              +++++++
55
56 error[E0308]: mismatched types
57   --> $DIR/integer-literal-suffix-inference.rs:55:12
58    |
59 LL |     id_i16(a32);
60    |            ^^^ expected `i16`, found `i32`
61    |
62 help: you can convert an `i32` to an `i16` and panic if the converted value doesn't fit
63    |
64 LL |     id_i16(a32.try_into().unwrap());
65    |               ++++++++++++++++++++
66
67 error[E0308]: mismatched types
68   --> $DIR/integer-literal-suffix-inference.rs:58:12
69    |
70 LL |     id_i16(a64);
71    |            ^^^ expected `i16`, found `i64`
72    |
73 help: you can convert an `i64` to an `i16` and panic if the converted value doesn't fit
74    |
75 LL |     id_i16(a64.try_into().unwrap());
76    |               ++++++++++++++++++++
77
78 error[E0308]: mismatched types
79   --> $DIR/integer-literal-suffix-inference.rs:61:12
80    |
81 LL |     id_i16(asize);
82    |            ^^^^^ expected `i16`, found `isize`
83    |
84 help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit
85    |
86 LL |     id_i16(asize.try_into().unwrap());
87    |                 ++++++++++++++++++++
88
89 error[E0308]: mismatched types
90   --> $DIR/integer-literal-suffix-inference.rs:65:12
91    |
92 LL |     id_i32(a8);
93    |            ^^ expected `i32`, found `i8`
94    |
95 help: you can convert an `i8` to an `i32`
96    |
97 LL |     id_i32(a8.into());
98    |              +++++++
99
100 error[E0308]: mismatched types
101   --> $DIR/integer-literal-suffix-inference.rs:68:12
102    |
103 LL |     id_i32(a16);
104    |            ^^^ expected `i32`, found `i16`
105    |
106 help: you can convert an `i16` to an `i32`
107    |
108 LL |     id_i32(a16.into());
109    |               +++++++
110
111 error[E0308]: mismatched types
112   --> $DIR/integer-literal-suffix-inference.rs:72:12
113    |
114 LL |     id_i32(a64);
115    |            ^^^ expected `i32`, found `i64`
116    |
117 help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit
118    |
119 LL |     id_i32(a64.try_into().unwrap());
120    |               ++++++++++++++++++++
121
122 error[E0308]: mismatched types
123   --> $DIR/integer-literal-suffix-inference.rs:75:12
124    |
125 LL |     id_i32(asize);
126    |            ^^^^^ expected `i32`, found `isize`
127    |
128 help: you can convert an `isize` to an `i32` and panic if the converted value doesn't fit
129    |
130 LL |     id_i32(asize.try_into().unwrap());
131    |                 ++++++++++++++++++++
132
133 error[E0308]: mismatched types
134   --> $DIR/integer-literal-suffix-inference.rs:79:12
135    |
136 LL |     id_i64(a8);
137    |            ^^ expected `i64`, found `i8`
138    |
139 help: you can convert an `i8` to an `i64`
140    |
141 LL |     id_i64(a8.into());
142    |              +++++++
143
144 error[E0308]: mismatched types
145   --> $DIR/integer-literal-suffix-inference.rs:82:12
146    |
147 LL |     id_i64(a16);
148    |            ^^^ expected `i64`, found `i16`
149    |
150 help: you can convert an `i16` to an `i64`
151    |
152 LL |     id_i64(a16.into());
153    |               +++++++
154
155 error[E0308]: mismatched types
156   --> $DIR/integer-literal-suffix-inference.rs:85:12
157    |
158 LL |     id_i64(a32);
159    |            ^^^ expected `i64`, found `i32`
160    |
161 help: you can convert an `i32` to an `i64`
162    |
163 LL |     id_i64(a32.into());
164    |               +++++++
165
166 error[E0308]: mismatched types
167   --> $DIR/integer-literal-suffix-inference.rs:89:12
168    |
169 LL |     id_i64(asize);
170    |            ^^^^^ expected `i64`, found `isize`
171    |
172 help: you can convert an `isize` to an `i64` and panic if the converted value doesn't fit
173    |
174 LL |     id_i64(asize.try_into().unwrap());
175    |                 ++++++++++++++++++++
176
177 error[E0308]: mismatched types
178   --> $DIR/integer-literal-suffix-inference.rs:93:14
179    |
180 LL |     id_isize(a8);
181    |              ^^ expected `isize`, found `i8`
182    |
183 help: you can convert an `i8` to an `isize`
184    |
185 LL |     id_isize(a8.into());
186    |                +++++++
187
188 error[E0308]: mismatched types
189   --> $DIR/integer-literal-suffix-inference.rs:96:14
190    |
191 LL |     id_isize(a16);
192    |              ^^^ expected `isize`, found `i16`
193    |
194 help: you can convert an `i16` to an `isize`
195    |
196 LL |     id_isize(a16.into());
197    |                 +++++++
198
199 error[E0308]: mismatched types
200   --> $DIR/integer-literal-suffix-inference.rs:99:14
201    |
202 LL |     id_isize(a32);
203    |              ^^^ expected `isize`, found `i32`
204    |
205 help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit
206    |
207 LL |     id_isize(a32.try_into().unwrap());
208    |                 ++++++++++++++++++++
209
210 error[E0308]: mismatched types
211   --> $DIR/integer-literal-suffix-inference.rs:102:14
212    |
213 LL |     id_isize(a64);
214    |              ^^^ expected `isize`, found `i64`
215    |
216 help: you can convert an `i64` to an `isize` and panic if the converted value doesn't fit
217    |
218 LL |     id_isize(a64.try_into().unwrap());
219    |                 ++++++++++++++++++++
220
221 error[E0308]: mismatched types
222   --> $DIR/integer-literal-suffix-inference.rs:108:11
223    |
224 LL |     id_i8(c16);
225    |           ^^^ expected `i8`, found `i16`
226    |
227 help: you can convert an `i16` to an `i8` and panic if the converted value doesn't fit
228    |
229 LL |     id_i8(c16.try_into().unwrap());
230    |              ++++++++++++++++++++
231
232 error[E0308]: mismatched types
233   --> $DIR/integer-literal-suffix-inference.rs:111:11
234    |
235 LL |     id_i8(c32);
236    |           ^^^ expected `i8`, found `i32`
237    |
238 help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit
239    |
240 LL |     id_i8(c32.try_into().unwrap());
241    |              ++++++++++++++++++++
242
243 error[E0308]: mismatched types
244   --> $DIR/integer-literal-suffix-inference.rs:114:11
245    |
246 LL |     id_i8(c64);
247    |           ^^^ expected `i8`, found `i64`
248    |
249 help: you can convert an `i64` to an `i8` and panic if the converted value doesn't fit
250    |
251 LL |     id_i8(c64.try_into().unwrap());
252    |              ++++++++++++++++++++
253
254 error[E0308]: mismatched types
255   --> $DIR/integer-literal-suffix-inference.rs:118:12
256    |
257 LL |     id_i16(c8);
258    |            ^^ expected `i16`, found `i8`
259    |
260 help: you can convert an `i8` to an `i16`
261    |
262 LL |     id_i16(c8.into());
263    |              +++++++
264
265 error[E0308]: mismatched types
266   --> $DIR/integer-literal-suffix-inference.rs:122:12
267    |
268 LL |     id_i16(c32);
269    |            ^^^ expected `i16`, found `i32`
270    |
271 help: you can convert an `i32` to an `i16` and panic if the converted value doesn't fit
272    |
273 LL |     id_i16(c32.try_into().unwrap());
274    |               ++++++++++++++++++++
275
276 error[E0308]: mismatched types
277   --> $DIR/integer-literal-suffix-inference.rs:125:12
278    |
279 LL |     id_i16(c64);
280    |            ^^^ expected `i16`, found `i64`
281    |
282 help: you can convert an `i64` to an `i16` and panic if the converted value doesn't fit
283    |
284 LL |     id_i16(c64.try_into().unwrap());
285    |               ++++++++++++++++++++
286
287 error[E0308]: mismatched types
288   --> $DIR/integer-literal-suffix-inference.rs:129:12
289    |
290 LL |     id_i32(c8);
291    |            ^^ expected `i32`, found `i8`
292    |
293 help: you can convert an `i8` to an `i32`
294    |
295 LL |     id_i32(c8.into());
296    |              +++++++
297
298 error[E0308]: mismatched types
299   --> $DIR/integer-literal-suffix-inference.rs:132:12
300    |
301 LL |     id_i32(c16);
302    |            ^^^ expected `i32`, found `i16`
303    |
304 help: you can convert an `i16` to an `i32`
305    |
306 LL |     id_i32(c16.into());
307    |               +++++++
308
309 error[E0308]: mismatched types
310   --> $DIR/integer-literal-suffix-inference.rs:136:12
311    |
312 LL |     id_i32(c64);
313    |            ^^^ expected `i32`, found `i64`
314    |
315 help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit
316    |
317 LL |     id_i32(c64.try_into().unwrap());
318    |               ++++++++++++++++++++
319
320 error[E0308]: mismatched types
321   --> $DIR/integer-literal-suffix-inference.rs:140:12
322    |
323 LL |     id_i64(a8);
324    |            ^^ expected `i64`, found `i8`
325    |
326 help: you can convert an `i8` to an `i64`
327    |
328 LL |     id_i64(a8.into());
329    |              +++++++
330
331 error[E0308]: mismatched types
332   --> $DIR/integer-literal-suffix-inference.rs:143:12
333    |
334 LL |     id_i64(a16);
335    |            ^^^ expected `i64`, found `i16`
336    |
337 help: you can convert an `i16` to an `i64`
338    |
339 LL |     id_i64(a16.into());
340    |               +++++++
341
342 error[E0308]: mismatched types
343   --> $DIR/integer-literal-suffix-inference.rs:146:12
344    |
345 LL |     id_i64(a32);
346    |            ^^^ expected `i64`, found `i32`
347    |
348 help: you can convert an `i32` to an `i64`
349    |
350 LL |     id_i64(a32.into());
351    |               +++++++
352
353 error[E0308]: mismatched types
354   --> $DIR/integer-literal-suffix-inference.rs:152:11
355    |
356 LL |     id_u8(b16);
357    |           ^^^ expected `u8`, found `u16`
358    |
359 help: you can convert a `u16` to a `u8` and panic if the converted value doesn't fit
360    |
361 LL |     id_u8(b16.try_into().unwrap());
362    |              ++++++++++++++++++++
363
364 error[E0308]: mismatched types
365   --> $DIR/integer-literal-suffix-inference.rs:155:11
366    |
367 LL |     id_u8(b32);
368    |           ^^^ expected `u8`, found `u32`
369    |
370 help: you can convert a `u32` to a `u8` and panic if the converted value doesn't fit
371    |
372 LL |     id_u8(b32.try_into().unwrap());
373    |              ++++++++++++++++++++
374
375 error[E0308]: mismatched types
376   --> $DIR/integer-literal-suffix-inference.rs:158:11
377    |
378 LL |     id_u8(b64);
379    |           ^^^ expected `u8`, found `u64`
380    |
381 help: you can convert a `u64` to a `u8` and panic if the converted value doesn't fit
382    |
383 LL |     id_u8(b64.try_into().unwrap());
384    |              ++++++++++++++++++++
385
386 error[E0308]: mismatched types
387   --> $DIR/integer-literal-suffix-inference.rs:161:11
388    |
389 LL |     id_u8(bsize);
390    |           ^^^^^ expected `u8`, found `usize`
391    |
392 help: you can convert a `usize` to a `u8` and panic if the converted value doesn't fit
393    |
394 LL |     id_u8(bsize.try_into().unwrap());
395    |                ++++++++++++++++++++
396
397 error[E0308]: mismatched types
398   --> $DIR/integer-literal-suffix-inference.rs:165:12
399    |
400 LL |     id_u16(b8);
401    |            ^^ expected `u16`, found `u8`
402    |
403 help: you can convert a `u8` to a `u16`
404    |
405 LL |     id_u16(b8.into());
406    |              +++++++
407
408 error[E0308]: mismatched types
409   --> $DIR/integer-literal-suffix-inference.rs:169:12
410    |
411 LL |     id_u16(b32);
412    |            ^^^ expected `u16`, found `u32`
413    |
414 help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit
415    |
416 LL |     id_u16(b32.try_into().unwrap());
417    |               ++++++++++++++++++++
418
419 error[E0308]: mismatched types
420   --> $DIR/integer-literal-suffix-inference.rs:172:12
421    |
422 LL |     id_u16(b64);
423    |            ^^^ expected `u16`, found `u64`
424    |
425 help: you can convert a `u64` to a `u16` and panic if the converted value doesn't fit
426    |
427 LL |     id_u16(b64.try_into().unwrap());
428    |               ++++++++++++++++++++
429
430 error[E0308]: mismatched types
431   --> $DIR/integer-literal-suffix-inference.rs:175:12
432    |
433 LL |     id_u16(bsize);
434    |            ^^^^^ expected `u16`, found `usize`
435    |
436 help: you can convert a `usize` to a `u16` and panic if the converted value doesn't fit
437    |
438 LL |     id_u16(bsize.try_into().unwrap());
439    |                 ++++++++++++++++++++
440
441 error[E0308]: mismatched types
442   --> $DIR/integer-literal-suffix-inference.rs:179:12
443    |
444 LL |     id_u32(b8);
445    |            ^^ expected `u32`, found `u8`
446    |
447 help: you can convert a `u8` to a `u32`
448    |
449 LL |     id_u32(b8.into());
450    |              +++++++
451
452 error[E0308]: mismatched types
453   --> $DIR/integer-literal-suffix-inference.rs:182:12
454    |
455 LL |     id_u32(b16);
456    |            ^^^ expected `u32`, found `u16`
457    |
458 help: you can convert a `u16` to a `u32`
459    |
460 LL |     id_u32(b16.into());
461    |               +++++++
462
463 error[E0308]: mismatched types
464   --> $DIR/integer-literal-suffix-inference.rs:186:12
465    |
466 LL |     id_u32(b64);
467    |            ^^^ expected `u32`, found `u64`
468    |
469 help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
470    |
471 LL |     id_u32(b64.try_into().unwrap());
472    |               ++++++++++++++++++++
473
474 error[E0308]: mismatched types
475   --> $DIR/integer-literal-suffix-inference.rs:189:12
476    |
477 LL |     id_u32(bsize);
478    |            ^^^^^ expected `u32`, found `usize`
479    |
480 help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
481    |
482 LL |     id_u32(bsize.try_into().unwrap());
483    |                 ++++++++++++++++++++
484
485 error[E0308]: mismatched types
486   --> $DIR/integer-literal-suffix-inference.rs:193:12
487    |
488 LL |     id_u64(b8);
489    |            ^^ expected `u64`, found `u8`
490    |
491 help: you can convert a `u8` to a `u64`
492    |
493 LL |     id_u64(b8.into());
494    |              +++++++
495
496 error[E0308]: mismatched types
497   --> $DIR/integer-literal-suffix-inference.rs:196:12
498    |
499 LL |     id_u64(b16);
500    |            ^^^ expected `u64`, found `u16`
501    |
502 help: you can convert a `u16` to a `u64`
503    |
504 LL |     id_u64(b16.into());
505    |               +++++++
506
507 error[E0308]: mismatched types
508   --> $DIR/integer-literal-suffix-inference.rs:199:12
509    |
510 LL |     id_u64(b32);
511    |            ^^^ expected `u64`, found `u32`
512    |
513 help: you can convert a `u32` to a `u64`
514    |
515 LL |     id_u64(b32.into());
516    |               +++++++
517
518 error[E0308]: mismatched types
519   --> $DIR/integer-literal-suffix-inference.rs:203:12
520    |
521 LL |     id_u64(bsize);
522    |            ^^^^^ expected `u64`, found `usize`
523    |
524 help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit
525    |
526 LL |     id_u64(bsize.try_into().unwrap());
527    |                 ++++++++++++++++++++
528
529 error[E0308]: mismatched types
530   --> $DIR/integer-literal-suffix-inference.rs:207:14
531    |
532 LL |     id_usize(b8);
533    |              ^^ expected `usize`, found `u8`
534    |
535 help: you can convert a `u8` to a `usize`
536    |
537 LL |     id_usize(b8.into());
538    |                +++++++
539
540 error[E0308]: mismatched types
541   --> $DIR/integer-literal-suffix-inference.rs:210:14
542    |
543 LL |     id_usize(b16);
544    |              ^^^ expected `usize`, found `u16`
545    |
546 help: you can convert a `u16` to a `usize`
547    |
548 LL |     id_usize(b16.into());
549    |                 +++++++
550
551 error[E0308]: mismatched types
552   --> $DIR/integer-literal-suffix-inference.rs:213:14
553    |
554 LL |     id_usize(b32);
555    |              ^^^ expected `usize`, found `u32`
556    |
557 help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
558    |
559 LL |     id_usize(b32.try_into().unwrap());
560    |                 ++++++++++++++++++++
561
562 error[E0308]: mismatched types
563   --> $DIR/integer-literal-suffix-inference.rs:216:14
564    |
565 LL |     id_usize(b64);
566    |              ^^^ expected `usize`, found `u64`
567    |
568 help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit
569    |
570 LL |     id_usize(b64.try_into().unwrap());
571    |                 ++++++++++++++++++++
572
573 error: aborting due to 52 previous errors
574
575 For more information about this error, try `rustc --explain E0308`.