fork/rust

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

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

1.39.0
10.4 KiB345 linesraw
1error[E0308]: mismatched types
2  --> $DIR/integer-literal-suffix-inference.rs:32:11
3   |
4LL |     id_i8(a16);
5   |           ^^^ expected i8, found i16
6help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
7   |
8LL |     id_i8(a16.try_into().unwrap());
9   |           ^^^^^^^^^^^^^^^^^^^^^^^
10
11error[E0308]: mismatched types
12  --> $DIR/integer-literal-suffix-inference.rs:35:11
13   |
14LL |     id_i8(a32);
15   |           ^^^ expected i8, found i32
16help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
17   |
18LL |     id_i8(a32.try_into().unwrap());
19   |           ^^^^^^^^^^^^^^^^^^^^^^^
20
21error[E0308]: mismatched types
22  --> $DIR/integer-literal-suffix-inference.rs:38:11
23   |
24LL |     id_i8(a64);
25   |           ^^^ expected i8, found i64
26help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
27   |
28LL |     id_i8(a64.try_into().unwrap());
29   |           ^^^^^^^^^^^^^^^^^^^^^^^
30
31error[E0308]: mismatched types
32  --> $DIR/integer-literal-suffix-inference.rs:42:12
33   |
34LL |     id_i16(a8);
35   |            ^^
36   |            |
37   |            expected i16, found i8
38   |            help: you can convert an `i8` to `i16`: `a8.into()`
39
40error[E0308]: mismatched types
41  --> $DIR/integer-literal-suffix-inference.rs:46:12
42   |
43LL |     id_i16(a32);
44   |            ^^^ expected i16, found i32
45help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
46   |
47LL |     id_i16(a32.try_into().unwrap());
48   |            ^^^^^^^^^^^^^^^^^^^^^^^
49
50error[E0308]: mismatched types
51  --> $DIR/integer-literal-suffix-inference.rs:49:12
52   |
53LL |     id_i16(a64);
54   |            ^^^ expected i16, found i64
55help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
56   |
57LL |     id_i16(a64.try_into().unwrap());
58   |            ^^^^^^^^^^^^^^^^^^^^^^^
59
60error[E0308]: mismatched types
61  --> $DIR/integer-literal-suffix-inference.rs:53:12
62   |
63LL |     id_i32(a8);
64   |            ^^
65   |            |
66   |            expected i32, found i8
67   |            help: you can convert an `i8` to `i32`: `a8.into()`
68
69error[E0308]: mismatched types
70  --> $DIR/integer-literal-suffix-inference.rs:56:12
71   |
72LL |     id_i32(a16);
73   |            ^^^
74   |            |
75   |            expected i32, found i16
76   |            help: you can convert an `i16` to `i32`: `a16.into()`
77
78error[E0308]: mismatched types
79  --> $DIR/integer-literal-suffix-inference.rs:60:12
80   |
81LL |     id_i32(a64);
82   |            ^^^ expected i32, found i64
83help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
84   |
85LL |     id_i32(a64.try_into().unwrap());
86   |            ^^^^^^^^^^^^^^^^^^^^^^^
87
88error[E0308]: mismatched types
89  --> $DIR/integer-literal-suffix-inference.rs:64:12
90   |
91LL |     id_i64(a8);
92   |            ^^
93   |            |
94   |            expected i64, found i8
95   |            help: you can convert an `i8` to `i64`: `a8.into()`
96
97error[E0308]: mismatched types
98  --> $DIR/integer-literal-suffix-inference.rs:67:12
99   |
100LL |     id_i64(a16);
101   |            ^^^
102   |            |
103   |            expected i64, found i16
104   |            help: you can convert an `i16` to `i64`: `a16.into()`
105
106error[E0308]: mismatched types
107  --> $DIR/integer-literal-suffix-inference.rs:70:12
108   |
109LL |     id_i64(a32);
110   |            ^^^
111   |            |
112   |            expected i64, found i32
113   |            help: you can convert an `i32` to `i64`: `a32.into()`
114
115error[E0308]: mismatched types
116  --> $DIR/integer-literal-suffix-inference.rs:76:11
117   |
118LL |     id_i8(c16);
119   |           ^^^ expected i8, found i16
120help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
121   |
122LL |     id_i8(c16.try_into().unwrap());
123   |           ^^^^^^^^^^^^^^^^^^^^^^^
124
125error[E0308]: mismatched types
126  --> $DIR/integer-literal-suffix-inference.rs:79:11
127   |
128LL |     id_i8(c32);
129   |           ^^^ expected i8, found i32
130help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
131   |
132LL |     id_i8(c32.try_into().unwrap());
133   |           ^^^^^^^^^^^^^^^^^^^^^^^
134
135error[E0308]: mismatched types
136  --> $DIR/integer-literal-suffix-inference.rs:82:11
137   |
138LL |     id_i8(c64);
139   |           ^^^ expected i8, found i64
140help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
141   |
142LL |     id_i8(c64.try_into().unwrap());
143   |           ^^^^^^^^^^^^^^^^^^^^^^^
144
145error[E0308]: mismatched types
146  --> $DIR/integer-literal-suffix-inference.rs:86:12
147   |
148LL |     id_i16(c8);
149   |            ^^
150   |            |
151   |            expected i16, found i8
152   |            help: you can convert an `i8` to `i16`: `c8.into()`
153
154error[E0308]: mismatched types
155  --> $DIR/integer-literal-suffix-inference.rs:90:12
156   |
157LL |     id_i16(c32);
158   |            ^^^ expected i16, found i32
159help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
160   |
161LL |     id_i16(c32.try_into().unwrap());
162   |            ^^^^^^^^^^^^^^^^^^^^^^^
163
164error[E0308]: mismatched types
165  --> $DIR/integer-literal-suffix-inference.rs:93:12
166   |
167LL |     id_i16(c64);
168   |            ^^^ expected i16, found i64
169help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
170   |
171LL |     id_i16(c64.try_into().unwrap());
172   |            ^^^^^^^^^^^^^^^^^^^^^^^
173
174error[E0308]: mismatched types
175  --> $DIR/integer-literal-suffix-inference.rs:97:12
176   |
177LL |     id_i32(c8);
178   |            ^^
179   |            |
180   |            expected i32, found i8
181   |            help: you can convert an `i8` to `i32`: `c8.into()`
182
183error[E0308]: mismatched types
184  --> $DIR/integer-literal-suffix-inference.rs:100:12
185   |
186LL |     id_i32(c16);
187   |            ^^^
188   |            |
189   |            expected i32, found i16
190   |            help: you can convert an `i16` to `i32`: `c16.into()`
191
192error[E0308]: mismatched types
193  --> $DIR/integer-literal-suffix-inference.rs:104:12
194   |
195LL |     id_i32(c64);
196   |            ^^^ expected i32, found i64
197help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
198   |
199LL |     id_i32(c64.try_into().unwrap());
200   |            ^^^^^^^^^^^^^^^^^^^^^^^
201
202error[E0308]: mismatched types
203  --> $DIR/integer-literal-suffix-inference.rs:108:12
204   |
205LL |     id_i64(a8);
206   |            ^^
207   |            |
208   |            expected i64, found i8
209   |            help: you can convert an `i8` to `i64`: `a8.into()`
210
211error[E0308]: mismatched types
212  --> $DIR/integer-literal-suffix-inference.rs:111:12
213   |
214LL |     id_i64(a16);
215   |            ^^^
216   |            |
217   |            expected i64, found i16
218   |            help: you can convert an `i16` to `i64`: `a16.into()`
219
220error[E0308]: mismatched types
221  --> $DIR/integer-literal-suffix-inference.rs:114:12
222   |
223LL |     id_i64(a32);
224   |            ^^^
225   |            |
226   |            expected i64, found i32
227   |            help: you can convert an `i32` to `i64`: `a32.into()`
228
229error[E0308]: mismatched types
230  --> $DIR/integer-literal-suffix-inference.rs:120:11
231   |
232LL |     id_u8(b16);
233   |           ^^^ expected u8, found u16
234help: you can convert an `u16` to `u8` and panic if the converted value wouldn't fit
235   |
236LL |     id_u8(b16.try_into().unwrap());
237   |           ^^^^^^^^^^^^^^^^^^^^^^^
238
239error[E0308]: mismatched types
240  --> $DIR/integer-literal-suffix-inference.rs:123:11
241   |
242LL |     id_u8(b32);
243   |           ^^^ expected u8, found u32
244help: you can convert an `u32` to `u8` and panic if the converted value wouldn't fit
245   |
246LL |     id_u8(b32.try_into().unwrap());
247   |           ^^^^^^^^^^^^^^^^^^^^^^^
248
249error[E0308]: mismatched types
250  --> $DIR/integer-literal-suffix-inference.rs:126:11
251   |
252LL |     id_u8(b64);
253   |           ^^^ expected u8, found u64
254help: you can convert an `u64` to `u8` and panic if the converted value wouldn't fit
255   |
256LL |     id_u8(b64.try_into().unwrap());
257   |           ^^^^^^^^^^^^^^^^^^^^^^^
258
259error[E0308]: mismatched types
260  --> $DIR/integer-literal-suffix-inference.rs:130:12
261   |
262LL |     id_u16(b8);
263   |            ^^
264   |            |
265   |            expected u16, found u8
266   |            help: you can convert an `u8` to `u16`: `b8.into()`
267
268error[E0308]: mismatched types
269  --> $DIR/integer-literal-suffix-inference.rs:134:12
270   |
271LL |     id_u16(b32);
272   |            ^^^ expected u16, found u32
273help: you can convert an `u32` to `u16` and panic if the converted value wouldn't fit
274   |
275LL |     id_u16(b32.try_into().unwrap());
276   |            ^^^^^^^^^^^^^^^^^^^^^^^
277
278error[E0308]: mismatched types
279  --> $DIR/integer-literal-suffix-inference.rs:137:12
280   |
281LL |     id_u16(b64);
282   |            ^^^ expected u16, found u64
283help: you can convert an `u64` to `u16` and panic if the converted value wouldn't fit
284   |
285LL |     id_u16(b64.try_into().unwrap());
286   |            ^^^^^^^^^^^^^^^^^^^^^^^
287
288error[E0308]: mismatched types
289  --> $DIR/integer-literal-suffix-inference.rs:141:12
290   |
291LL |     id_u32(b8);
292   |            ^^
293   |            |
294   |            expected u32, found u8
295   |            help: you can convert an `u8` to `u32`: `b8.into()`
296
297error[E0308]: mismatched types
298  --> $DIR/integer-literal-suffix-inference.rs:144:12
299   |
300LL |     id_u32(b16);
301   |            ^^^
302   |            |
303   |            expected u32, found u16
304   |            help: you can convert an `u16` to `u32`: `b16.into()`
305
306error[E0308]: mismatched types
307  --> $DIR/integer-literal-suffix-inference.rs:148:12
308   |
309LL |     id_u32(b64);
310   |            ^^^ expected u32, found u64
311help: you can convert an `u64` to `u32` and panic if the converted value wouldn't fit
312   |
313LL |     id_u32(b64.try_into().unwrap());
314   |            ^^^^^^^^^^^^^^^^^^^^^^^
315
316error[E0308]: mismatched types
317  --> $DIR/integer-literal-suffix-inference.rs:152:12
318   |
319LL |     id_u64(b8);
320   |            ^^
321   |            |
322   |            expected u64, found u8
323   |            help: you can convert an `u8` to `u64`: `b8.into()`
324
325error[E0308]: mismatched types
326  --> $DIR/integer-literal-suffix-inference.rs:155:12
327   |
328LL |     id_u64(b16);
329   |            ^^^
330   |            |
331   |            expected u64, found u16
332   |            help: you can convert an `u16` to `u64`: `b16.into()`
333
334error[E0308]: mismatched types
335  --> $DIR/integer-literal-suffix-inference.rs:158:12
336   |
337LL |     id_u64(b32);
338   |            ^^^
339   |            |
340   |            expected u64, found u32
341   |            help: you can convert an `u32` to `u64`: `b32.into()`
342
343error: aborting due to 36 previous errors
344
345For more information about this error, try `rustc --explain E0308`.