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