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