fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

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