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