1error[E0308]: mismatched types 2 --> $DIR/numeric-cast.rs:23:18 3 | 4LL | foo::<usize>(x_u64); 5 | ------------ ^^^^^ expected `usize`, found `u64` 6 | | 7 | arguments to this function are incorrect 8 | 9note: function defined here 10 --> $DIR/numeric-cast.rs:6:4 11 | 12LL | fn foo<N>(_x: N) {} 13 | ^^^ ----- 14help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit 15 | 16LL | foo::<usize>(x_u64.try_into().unwrap()); 17 | ++++++++++++++++++++ 18 19error[E0308]: mismatched types 20 --> $DIR/numeric-cast.rs:25:18 21 | 22LL | foo::<usize>(x_u32); 23 | ------------ ^^^^^ expected `usize`, found `u32` 24 | | 25 | arguments to this function are incorrect 26 | 27note: function defined here 28 --> $DIR/numeric-cast.rs:6:4 29 | 30LL | fn foo<N>(_x: N) {} 31 | ^^^ ----- 32help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit 33 | 34LL | foo::<usize>(x_u32.try_into().unwrap()); 35 | ++++++++++++++++++++ 36 37error[E0308]: mismatched types 38 --> $DIR/numeric-cast.rs:27:18 39 | 40LL | foo::<usize>(x_u16); 41 | ------------ ^^^^^ expected `usize`, found `u16` 42 | | 43 | arguments to this function are incorrect 44 | 45note: function defined here 46 --> $DIR/numeric-cast.rs:6:4 47 | 48LL | fn foo<N>(_x: N) {} 49 | ^^^ ----- 50help: you can convert a `u16` to a `usize` 51 | 52LL | foo::<usize>(x_u16.into()); 53 | +++++++ 54 55error[E0308]: mismatched types 56 --> $DIR/numeric-cast.rs:29:18 57 | 58LL | foo::<usize>(x_u8); 59 | ------------ ^^^^ expected `usize`, found `u8` 60 | | 61 | arguments to this function are incorrect 62 | 63note: function defined here 64 --> $DIR/numeric-cast.rs:6:4 65 | 66LL | fn foo<N>(_x: N) {} 67 | ^^^ ----- 68help: you can convert a `u8` to a `usize` 69 | 70LL | foo::<usize>(x_u8.into()); 71 | +++++++ 72 73error[E0308]: mismatched types 74 --> $DIR/numeric-cast.rs:31:18 75 | 76LL | foo::<usize>(x_isize); 77 | ------------ ^^^^^^^ expected `usize`, found `isize` 78 | | 79 | arguments to this function are incorrect 80 | 81note: function defined here 82 --> $DIR/numeric-cast.rs:6:4 83 | 84LL | fn foo<N>(_x: N) {} 85 | ^^^ ----- 86help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit 87 | 88LL | foo::<usize>(x_isize.try_into().unwrap()); 89 | ++++++++++++++++++++ 90 91error[E0308]: mismatched types 92 --> $DIR/numeric-cast.rs:33:18 93 | 94LL | foo::<usize>(x_i64); 95 | ------------ ^^^^^ expected `usize`, found `i64` 96 | | 97 | arguments to this function are incorrect 98 | 99note: function defined here 100 --> $DIR/numeric-cast.rs:6:4 101 | 102LL | fn foo<N>(_x: N) {} 103 | ^^^ ----- 104help: you can convert an `i64` to a `usize` and panic if the converted value doesn't fit 105 | 106LL | foo::<usize>(x_i64.try_into().unwrap()); 107 | ++++++++++++++++++++ 108 109error[E0308]: mismatched types 110 --> $DIR/numeric-cast.rs:35:18 111 | 112LL | foo::<usize>(x_i32); 113 | ------------ ^^^^^ expected `usize`, found `i32` 114 | | 115 | arguments to this function are incorrect 116 | 117note: function defined here 118 --> $DIR/numeric-cast.rs:6:4 119 | 120LL | fn foo<N>(_x: N) {} 121 | ^^^ ----- 122help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit 123 | 124LL | foo::<usize>(x_i32.try_into().unwrap()); 125 | ++++++++++++++++++++ 126 127error[E0308]: mismatched types 128 --> $DIR/numeric-cast.rs:37:18 129 | 130LL | foo::<usize>(x_i16); 131 | ------------ ^^^^^ expected `usize`, found `i16` 132 | | 133 | arguments to this function are incorrect 134 | 135note: function defined here 136 --> $DIR/numeric-cast.rs:6:4 137 | 138LL | fn foo<N>(_x: N) {} 139 | ^^^ ----- 140help: you can convert an `i16` to a `usize` and panic if the converted value doesn't fit 141 | 142LL | foo::<usize>(x_i16.try_into().unwrap()); 143 | ++++++++++++++++++++ 144 145error[E0308]: mismatched types 146 --> $DIR/numeric-cast.rs:39:18 147 | 148LL | foo::<usize>(x_i8); 149 | ------------ ^^^^ expected `usize`, found `i8` 150 | | 151 | arguments to this function are incorrect 152 | 153note: function defined here 154 --> $DIR/numeric-cast.rs:6:4 155 | 156LL | fn foo<N>(_x: N) {} 157 | ^^^ ----- 158help: you can convert an `i8` to a `usize` and panic if the converted value doesn't fit 159 | 160LL | foo::<usize>(x_i8.try_into().unwrap()); 161 | ++++++++++++++++++++ 162 163error[E0308]: mismatched types 164 --> $DIR/numeric-cast.rs:44:18 165 | 166LL | foo::<isize>(x_usize); 167 | ------------ ^^^^^^^ expected `isize`, found `usize` 168 | | 169 | arguments to this function are incorrect 170 | 171note: function defined here 172 --> $DIR/numeric-cast.rs:6:4 173 | 174LL | fn foo<N>(_x: N) {} 175 | ^^^ ----- 176help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit 177 | 178LL | foo::<isize>(x_usize.try_into().unwrap()); 179 | ++++++++++++++++++++ 180 181error[E0308]: mismatched types 182 --> $DIR/numeric-cast.rs:46:18 183 | 184LL | foo::<isize>(x_u64); 185 | ------------ ^^^^^ expected `isize`, found `u64` 186 | | 187 | arguments to this function are incorrect 188 | 189note: function defined here 190 --> $DIR/numeric-cast.rs:6:4 191 | 192LL | fn foo<N>(_x: N) {} 193 | ^^^ ----- 194help: you can convert a `u64` to an `isize` and panic if the converted value doesn't fit 195 | 196LL | foo::<isize>(x_u64.try_into().unwrap()); 197 | ++++++++++++++++++++ 198 199error[E0308]: mismatched types 200 --> $DIR/numeric-cast.rs:48:18 201 | 202LL | foo::<isize>(x_u32); 203 | ------------ ^^^^^ expected `isize`, found `u32` 204 | | 205 | arguments to this function are incorrect 206 | 207note: function defined here 208 --> $DIR/numeric-cast.rs:6:4 209 | 210LL | fn foo<N>(_x: N) {} 211 | ^^^ ----- 212help: you can convert a `u32` to an `isize` and panic if the converted value doesn't fit 213 | 214LL | foo::<isize>(x_u32.try_into().unwrap()); 215 | ++++++++++++++++++++ 216 217error[E0308]: mismatched types 218 --> $DIR/numeric-cast.rs:50:18 219 | 220LL | foo::<isize>(x_u16); 221 | ------------ ^^^^^ expected `isize`, found `u16` 222 | | 223 | arguments to this function are incorrect 224 | 225note: function defined here 226 --> $DIR/numeric-cast.rs:6:4 227 | 228LL | fn foo<N>(_x: N) {} 229 | ^^^ ----- 230help: you can convert a `u16` to an `isize` and panic if the converted value doesn't fit 231 | 232LL | foo::<isize>(x_u16.try_into().unwrap()); 233 | ++++++++++++++++++++ 234 235error[E0308]: mismatched types 236 --> $DIR/numeric-cast.rs:52:18 237 | 238LL | foo::<isize>(x_u8); 239 | ------------ ^^^^ expected `isize`, found `u8` 240 | | 241 | arguments to this function are incorrect 242 | 243note: function defined here 244 --> $DIR/numeric-cast.rs:6:4 245 | 246LL | fn foo<N>(_x: N) {} 247 | ^^^ ----- 248help: you can convert a `u8` to an `isize` 249 | 250LL | foo::<isize>(x_u8.into()); 251 | +++++++ 252 253error[E0308]: mismatched types 254 --> $DIR/numeric-cast.rs:55:18 255 | 256LL | foo::<isize>(x_i64); 257 | ------------ ^^^^^ expected `isize`, found `i64` 258 | | 259 | arguments to this function are incorrect 260 | 261note: function defined here 262 --> $DIR/numeric-cast.rs:6:4 263 | 264LL | fn foo<N>(_x: N) {} 265 | ^^^ ----- 266help: you can convert an `i64` to an `isize` and panic if the converted value doesn't fit 267 | 268LL | foo::<isize>(x_i64.try_into().unwrap()); 269 | ++++++++++++++++++++ 270 271error[E0308]: mismatched types 272 --> $DIR/numeric-cast.rs:57:18 273 | 274LL | foo::<isize>(x_i32); 275 | ------------ ^^^^^ expected `isize`, found `i32` 276 | | 277 | arguments to this function are incorrect 278 | 279note: function defined here 280 --> $DIR/numeric-cast.rs:6:4 281 | 282LL | fn foo<N>(_x: N) {} 283 | ^^^ ----- 284help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit 285 | 286LL | foo::<isize>(x_i32.try_into().unwrap()); 287 | ++++++++++++++++++++ 288 289error[E0308]: mismatched types 290 --> $DIR/numeric-cast.rs:59:18 291 | 292LL | foo::<isize>(x_i16); 293 | ------------ ^^^^^ expected `isize`, found `i16` 294 | | 295 | arguments to this function are incorrect 296 | 297note: function defined here 298 --> $DIR/numeric-cast.rs:6:4 299 | 300LL | fn foo<N>(_x: N) {} 301 | ^^^ ----- 302help: you can convert an `i16` to an `isize` 303 | 304LL | foo::<isize>(x_i16.into()); 305 | +++++++ 306 307error[E0308]: mismatched types 308 --> $DIR/numeric-cast.rs:61:18 309 | 310LL | foo::<isize>(x_i8); 311 | ------------ ^^^^ expected `isize`, found `i8` 312 | | 313 | arguments to this function are incorrect 314 | 315note: function defined here 316 --> $DIR/numeric-cast.rs:6:4 317 | 318LL | fn foo<N>(_x: N) {} 319 | ^^^ ----- 320help: you can convert an `i8` to an `isize` 321 | 322LL | foo::<isize>(x_i8.into()); 323 | +++++++ 324 325error[E0308]: mismatched types 326 --> $DIR/numeric-cast.rs:66:16 327 | 328LL | foo::<u64>(x_usize); 329 | ---------- ^^^^^^^ expected `u64`, found `usize` 330 | | 331 | arguments to this function are incorrect 332 | 333note: function defined here 334 --> $DIR/numeric-cast.rs:6:4 335 | 336LL | fn foo<N>(_x: N) {} 337 | ^^^ ----- 338help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit 339 | 340LL | foo::<u64>(x_usize.try_into().unwrap()); 341 | ++++++++++++++++++++ 342 343error[E0308]: mismatched types 344 --> $DIR/numeric-cast.rs:69:16 345 | 346LL | foo::<u64>(x_u32); 347 | ---------- ^^^^^ expected `u64`, found `u32` 348 | | 349 | arguments to this function are incorrect 350 | 351note: function defined here 352 --> $DIR/numeric-cast.rs:6:4 353 | 354LL | fn foo<N>(_x: N) {} 355 | ^^^ ----- 356help: you can convert a `u32` to a `u64` 357 | 358LL | foo::<u64>(x_u32.into()); 359 | +++++++ 360 361error[E0308]: mismatched types 362 --> $DIR/numeric-cast.rs:71:16 363 | 364LL | foo::<u64>(x_u16); 365 | ---------- ^^^^^ expected `u64`, found `u16` 366 | | 367 | arguments to this function are incorrect 368 | 369note: function defined here 370 --> $DIR/numeric-cast.rs:6:4 371 | 372LL | fn foo<N>(_x: N) {} 373 | ^^^ ----- 374help: you can convert a `u16` to a `u64` 375 | 376LL | foo::<u64>(x_u16.into()); 377 | +++++++ 378 379error[E0308]: mismatched types 380 --> $DIR/numeric-cast.rs:73:16 381 | 382LL | foo::<u64>(x_u8); 383 | ---------- ^^^^ expected `u64`, found `u8` 384 | | 385 | arguments to this function are incorrect 386 | 387note: function defined here 388 --> $DIR/numeric-cast.rs:6:4 389 | 390LL | fn foo<N>(_x: N) {} 391 | ^^^ ----- 392help: you can convert a `u8` to a `u64` 393 | 394LL | foo::<u64>(x_u8.into()); 395 | +++++++ 396 397error[E0308]: mismatched types 398 --> $DIR/numeric-cast.rs:75:16 399 | 400LL | foo::<u64>(x_isize); 401 | ---------- ^^^^^^^ expected `u64`, found `isize` 402 | | 403 | arguments to this function are incorrect 404 | 405note: function defined here 406 --> $DIR/numeric-cast.rs:6:4 407 | 408LL | fn foo<N>(_x: N) {} 409 | ^^^ ----- 410help: you can convert an `isize` to a `u64` and panic if the converted value doesn't fit 411 | 412LL | foo::<u64>(x_isize.try_into().unwrap()); 413 | ++++++++++++++++++++ 414 415error[E0308]: mismatched types 416 --> $DIR/numeric-cast.rs:77:16 417 | 418LL | foo::<u64>(x_i64); 419 | ---------- ^^^^^ expected `u64`, found `i64` 420 | | 421 | arguments to this function are incorrect 422 | 423note: function defined here 424 --> $DIR/numeric-cast.rs:6:4 425 | 426LL | fn foo<N>(_x: N) {} 427 | ^^^ ----- 428help: you can convert an `i64` to a `u64` and panic if the converted value doesn't fit 429 | 430LL | foo::<u64>(x_i64.try_into().unwrap()); 431 | ++++++++++++++++++++ 432 433error[E0308]: mismatched types 434 --> $DIR/numeric-cast.rs:79:16 435 | 436LL | foo::<u64>(x_i32); 437 | ---------- ^^^^^ expected `u64`, found `i32` 438 | | 439 | arguments to this function are incorrect 440 | 441note: function defined here 442 --> $DIR/numeric-cast.rs:6:4 443 | 444LL | fn foo<N>(_x: N) {} 445 | ^^^ ----- 446help: you can convert an `i32` to a `u64` and panic if the converted value doesn't fit 447 | 448LL | foo::<u64>(x_i32.try_into().unwrap()); 449 | ++++++++++++++++++++ 450 451error[E0308]: mismatched types 452 --> $DIR/numeric-cast.rs:81:16 453 | 454LL | foo::<u64>(x_i16); 455 | ---------- ^^^^^ expected `u64`, found `i16` 456 | | 457 | arguments to this function are incorrect 458 | 459note: function defined here 460 --> $DIR/numeric-cast.rs:6:4 461 | 462LL | fn foo<N>(_x: N) {} 463 | ^^^ ----- 464help: you can convert an `i16` to a `u64` and panic if the converted value doesn't fit 465 | 466LL | foo::<u64>(x_i16.try_into().unwrap()); 467 | ++++++++++++++++++++ 468 469error[E0308]: mismatched types 470 --> $DIR/numeric-cast.rs:83:16 471 | 472LL | foo::<u64>(x_i8); 473 | ---------- ^^^^ expected `u64`, found `i8` 474 | | 475 | arguments to this function are incorrect 476 | 477note: function defined here 478 --> $DIR/numeric-cast.rs:6:4 479 | 480LL | fn foo<N>(_x: N) {} 481 | ^^^ ----- 482help: you can convert an `i8` to a `u64` and panic if the converted value doesn't fit 483 | 484LL | foo::<u64>(x_i8.try_into().unwrap()); 485 | ++++++++++++++++++++ 486 487error[E0308]: mismatched types 488 --> $DIR/numeric-cast.rs:88:16 489 | 490LL | foo::<i64>(x_usize); 491 | ---------- ^^^^^^^ expected `i64`, found `usize` 492 | | 493 | arguments to this function are incorrect 494 | 495note: function defined here 496 --> $DIR/numeric-cast.rs:6:4 497 | 498LL | fn foo<N>(_x: N) {} 499 | ^^^ ----- 500help: you can convert a `usize` to an `i64` and panic if the converted value doesn't fit 501 | 502LL | foo::<i64>(x_usize.try_into().unwrap()); 503 | ++++++++++++++++++++ 504 505error[E0308]: mismatched types 506 --> $DIR/numeric-cast.rs:90:16 507 | 508LL | foo::<i64>(x_u64); 509 | ---------- ^^^^^ expected `i64`, found `u64` 510 | | 511 | arguments to this function are incorrect 512 | 513note: function defined here 514 --> $DIR/numeric-cast.rs:6:4 515 | 516LL | fn foo<N>(_x: N) {} 517 | ^^^ ----- 518help: you can convert a `u64` to an `i64` and panic if the converted value doesn't fit 519 | 520LL | foo::<i64>(x_u64.try_into().unwrap()); 521 | ++++++++++++++++++++ 522 523error[E0308]: mismatched types 524 --> $DIR/numeric-cast.rs:92:16 525 | 526LL | foo::<i64>(x_u32); 527 | ---------- ^^^^^ expected `i64`, found `u32` 528 | | 529 | arguments to this function are incorrect 530 | 531note: function defined here 532 --> $DIR/numeric-cast.rs:6:4 533 | 534LL | fn foo<N>(_x: N) {} 535 | ^^^ ----- 536help: you can convert a `u32` to an `i64` 537 | 538LL | foo::<i64>(x_u32.into()); 539 | +++++++ 540 541error[E0308]: mismatched types 542 --> $DIR/numeric-cast.rs:94:16 543 | 544LL | foo::<i64>(x_u16); 545 | ---------- ^^^^^ expected `i64`, found `u16` 546 | | 547 | arguments to this function are incorrect 548 | 549note: function defined here 550 --> $DIR/numeric-cast.rs:6:4 551 | 552LL | fn foo<N>(_x: N) {} 553 | ^^^ ----- 554help: you can convert a `u16` to an `i64` 555 | 556LL | foo::<i64>(x_u16.into()); 557 | +++++++ 558 559error[E0308]: mismatched types 560 --> $DIR/numeric-cast.rs:96:16 561 | 562LL | foo::<i64>(x_u8); 563 | ---------- ^^^^ expected `i64`, found `u8` 564 | | 565 | arguments to this function are incorrect 566 | 567note: function defined here 568 --> $DIR/numeric-cast.rs:6:4 569 | 570LL | fn foo<N>(_x: N) {} 571 | ^^^ ----- 572help: you can convert a `u8` to an `i64` 573 | 574LL | foo::<i64>(x_u8.into()); 575 | +++++++ 576 577error[E0308]: mismatched types 578 --> $DIR/numeric-cast.rs:98:16 579 | 580LL | foo::<i64>(x_isize); 581 | ---------- ^^^^^^^ expected `i64`, found `isize` 582 | | 583 | arguments to this function are incorrect 584 | 585note: function defined here 586 --> $DIR/numeric-cast.rs:6:4 587 | 588LL | fn foo<N>(_x: N) {} 589 | ^^^ ----- 590help: you can convert an `isize` to an `i64` and panic if the converted value doesn't fit 591 | 592LL | foo::<i64>(x_isize.try_into().unwrap()); 593 | ++++++++++++++++++++ 594 595error[E0308]: mismatched types 596 --> $DIR/numeric-cast.rs:101:16 597 | 598LL | foo::<i64>(x_i32); 599 | ---------- ^^^^^ expected `i64`, found `i32` 600 | | 601 | arguments to this function are incorrect 602 | 603note: function defined here 604 --> $DIR/numeric-cast.rs:6:4 605 | 606LL | fn foo<N>(_x: N) {} 607 | ^^^ ----- 608help: you can convert an `i32` to an `i64` 609 | 610LL | foo::<i64>(x_i32.into()); 611 | +++++++ 612 613error[E0308]: mismatched types 614 --> $DIR/numeric-cast.rs:103:16 615 | 616LL | foo::<i64>(x_i16); 617 | ---------- ^^^^^ expected `i64`, found `i16` 618 | | 619 | arguments to this function are incorrect 620 | 621note: function defined here 622 --> $DIR/numeric-cast.rs:6:4 623 | 624LL | fn foo<N>(_x: N) {} 625 | ^^^ ----- 626help: you can convert an `i16` to an `i64` 627 | 628LL | foo::<i64>(x_i16.into()); 629 | +++++++ 630 631error[E0308]: mismatched types 632 --> $DIR/numeric-cast.rs:105:16 633 | 634LL | foo::<i64>(x_i8); 635 | ---------- ^^^^ expected `i64`, found `i8` 636 | | 637 | arguments to this function are incorrect 638 | 639note: function defined here 640 --> $DIR/numeric-cast.rs:6:4 641 | 642LL | fn foo<N>(_x: N) {} 643 | ^^^ ----- 644help: you can convert an `i8` to an `i64` 645 | 646LL | foo::<i64>(x_i8.into()); 647 | +++++++ 648 649error[E0308]: mismatched types 650 --> $DIR/numeric-cast.rs:110:16 651 | 652LL | foo::<u32>(x_usize); 653 | ---------- ^^^^^^^ expected `u32`, found `usize` 654 | | 655 | arguments to this function are incorrect 656 | 657note: function defined here 658 --> $DIR/numeric-cast.rs:6:4 659 | 660LL | fn foo<N>(_x: N) {} 661 | ^^^ ----- 662help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit 663 | 664LL | foo::<u32>(x_usize.try_into().unwrap()); 665 | ++++++++++++++++++++ 666 667error[E0308]: mismatched types 668 --> $DIR/numeric-cast.rs:112:16 669 | 670LL | foo::<u32>(x_u64); 671 | ---------- ^^^^^ expected `u32`, found `u64` 672 | | 673 | arguments to this function are incorrect 674 | 675note: function defined here 676 --> $DIR/numeric-cast.rs:6:4 677 | 678LL | fn foo<N>(_x: N) {} 679 | ^^^ ----- 680help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit 681 | 682LL | foo::<u32>(x_u64.try_into().unwrap()); 683 | ++++++++++++++++++++ 684 685error[E0308]: mismatched types 686 --> $DIR/numeric-cast.rs:115:16 687 | 688LL | foo::<u32>(x_u16); 689 | ---------- ^^^^^ expected `u32`, found `u16` 690 | | 691 | arguments to this function are incorrect 692 | 693note: function defined here 694 --> $DIR/numeric-cast.rs:6:4 695 | 696LL | fn foo<N>(_x: N) {} 697 | ^^^ ----- 698help: you can convert a `u16` to a `u32` 699 | 700LL | foo::<u32>(x_u16.into()); 701 | +++++++ 702 703error[E0308]: mismatched types 704 --> $DIR/numeric-cast.rs:117:16 705 | 706LL | foo::<u32>(x_u8); 707 | ---------- ^^^^ expected `u32`, found `u8` 708 | | 709 | arguments to this function are incorrect 710 | 711note: function defined here 712 --> $DIR/numeric-cast.rs:6:4 713 | 714LL | fn foo<N>(_x: N) {} 715 | ^^^ ----- 716help: you can convert a `u8` to a `u32` 717 | 718LL | foo::<u32>(x_u8.into()); 719 | +++++++ 720 721error[E0308]: mismatched types 722 --> $DIR/numeric-cast.rs:119:16 723 | 724LL | foo::<u32>(x_isize); 725 | ---------- ^^^^^^^ expected `u32`, found `isize` 726 | | 727 | arguments to this function are incorrect 728 | 729note: function defined here 730 --> $DIR/numeric-cast.rs:6:4 731 | 732LL | fn foo<N>(_x: N) {} 733 | ^^^ ----- 734help: you can convert an `isize` to a `u32` and panic if the converted value doesn't fit 735 | 736LL | foo::<u32>(x_isize.try_into().unwrap()); 737 | ++++++++++++++++++++ 738 739error[E0308]: mismatched types 740 --> $DIR/numeric-cast.rs:121:16 741 | 742LL | foo::<u32>(x_i64); 743 | ---------- ^^^^^ expected `u32`, found `i64` 744 | | 745 | arguments to this function are incorrect 746 | 747note: function defined here 748 --> $DIR/numeric-cast.rs:6:4 749 | 750LL | fn foo<N>(_x: N) {} 751 | ^^^ ----- 752help: you can convert an `i64` to a `u32` and panic if the converted value doesn't fit 753 | 754LL | foo::<u32>(x_i64.try_into().unwrap()); 755 | ++++++++++++++++++++ 756 757error[E0308]: mismatched types 758 --> $DIR/numeric-cast.rs:123:16 759 | 760LL | foo::<u32>(x_i32); 761 | ---------- ^^^^^ expected `u32`, found `i32` 762 | | 763 | arguments to this function are incorrect 764 | 765note: function defined here 766 --> $DIR/numeric-cast.rs:6:4 767 | 768LL | fn foo<N>(_x: N) {} 769 | ^^^ ----- 770help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit 771 | 772LL | foo::<u32>(x_i32.try_into().unwrap()); 773 | ++++++++++++++++++++ 774 775error[E0308]: mismatched types 776 --> $DIR/numeric-cast.rs:125:16 777 | 778LL | foo::<u32>(x_i16); 779 | ---------- ^^^^^ expected `u32`, found `i16` 780 | | 781 | arguments to this function are incorrect 782 | 783note: function defined here 784 --> $DIR/numeric-cast.rs:6:4 785 | 786LL | fn foo<N>(_x: N) {} 787 | ^^^ ----- 788help: you can convert an `i16` to a `u32` and panic if the converted value doesn't fit 789 | 790LL | foo::<u32>(x_i16.try_into().unwrap()); 791 | ++++++++++++++++++++ 792 793error[E0308]: mismatched types 794 --> $DIR/numeric-cast.rs:127:16 795 | 796LL | foo::<u32>(x_i8); 797 | ---------- ^^^^ expected `u32`, found `i8` 798 | | 799 | arguments to this function are incorrect 800 | 801note: function defined here 802 --> $DIR/numeric-cast.rs:6:4 803 | 804LL | fn foo<N>(_x: N) {} 805 | ^^^ ----- 806help: you can convert an `i8` to a `u32` and panic if the converted value doesn't fit 807 | 808LL | foo::<u32>(x_i8.try_into().unwrap()); 809 | ++++++++++++++++++++ 810 811error[E0308]: mismatched types 812 --> $DIR/numeric-cast.rs:132:16 813 | 814LL | foo::<i32>(x_usize); 815 | ---------- ^^^^^^^ expected `i32`, found `usize` 816 | | 817 | arguments to this function are incorrect 818 | 819note: function defined here 820 --> $DIR/numeric-cast.rs:6:4 821 | 822LL | fn foo<N>(_x: N) {} 823 | ^^^ ----- 824help: you can convert a `usize` to an `i32` and panic if the converted value doesn't fit 825 | 826LL | foo::<i32>(x_usize.try_into().unwrap()); 827 | ++++++++++++++++++++ 828 829error[E0308]: mismatched types 830 --> $DIR/numeric-cast.rs:134:16 831 | 832LL | foo::<i32>(x_u64); 833 | ---------- ^^^^^ expected `i32`, found `u64` 834 | | 835 | arguments to this function are incorrect 836 | 837note: function defined here 838 --> $DIR/numeric-cast.rs:6:4 839 | 840LL | fn foo<N>(_x: N) {} 841 | ^^^ ----- 842help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit 843 | 844LL | foo::<i32>(x_u64.try_into().unwrap()); 845 | ++++++++++++++++++++ 846 847error[E0308]: mismatched types 848 --> $DIR/numeric-cast.rs:136:16 849 | 850LL | foo::<i32>(x_u32); 851 | ---------- ^^^^^ expected `i32`, found `u32` 852 | | 853 | arguments to this function are incorrect 854 | 855note: function defined here 856 --> $DIR/numeric-cast.rs:6:4 857 | 858LL | fn foo<N>(_x: N) {} 859 | ^^^ ----- 860help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit 861 | 862LL | foo::<i32>(x_u32.try_into().unwrap()); 863 | ++++++++++++++++++++ 864 865error[E0308]: mismatched types 866 --> $DIR/numeric-cast.rs:138:16 867 | 868LL | foo::<i32>(x_u16); 869 | ---------- ^^^^^ expected `i32`, found `u16` 870 | | 871 | arguments to this function are incorrect 872 | 873note: function defined here 874 --> $DIR/numeric-cast.rs:6:4 875 | 876LL | fn foo<N>(_x: N) {} 877 | ^^^ ----- 878help: you can convert a `u16` to an `i32` 879 | 880LL | foo::<i32>(x_u16.into()); 881 | +++++++ 882 883error[E0308]: mismatched types 884 --> $DIR/numeric-cast.rs:140:16 885 | 886LL | foo::<i32>(x_u8); 887 | ---------- ^^^^ expected `i32`, found `u8` 888 | | 889 | arguments to this function are incorrect 890 | 891note: function defined here 892 --> $DIR/numeric-cast.rs:6:4 893 | 894LL | fn foo<N>(_x: N) {} 895 | ^^^ ----- 896help: you can convert a `u8` to an `i32` 897 | 898LL | foo::<i32>(x_u8.into()); 899 | +++++++ 900 901error[E0308]: mismatched types 902 --> $DIR/numeric-cast.rs:142:16 903 | 904LL | foo::<i32>(x_isize); 905 | ---------- ^^^^^^^ expected `i32`, found `isize` 906 | | 907 | arguments to this function are incorrect 908 | 909note: function defined here 910 --> $DIR/numeric-cast.rs:6:4 911 | 912LL | fn foo<N>(_x: N) {} 913 | ^^^ ----- 914help: you can convert an `isize` to an `i32` and panic if the converted value doesn't fit 915 | 916LL | foo::<i32>(x_isize.try_into().unwrap()); 917 | ++++++++++++++++++++ 918 919error[E0308]: mismatched types 920 --> $DIR/numeric-cast.rs:144:16 921 | 922LL | foo::<i32>(x_i64); 923 | ---------- ^^^^^ expected `i32`, found `i64` 924 | | 925 | arguments to this function are incorrect 926 | 927note: function defined here 928 --> $DIR/numeric-cast.rs:6:4 929 | 930LL | fn foo<N>(_x: N) {} 931 | ^^^ ----- 932help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit 933 | 934LL | foo::<i32>(x_i64.try_into().unwrap()); 935 | ++++++++++++++++++++ 936 937error[E0308]: mismatched types 938 --> $DIR/numeric-cast.rs:147:16 939 | 940LL | foo::<i32>(x_i16); 941 | ---------- ^^^^^ expected `i32`, found `i16` 942 | | 943 | arguments to this function are incorrect 944 | 945note: function defined here 946 --> $DIR/numeric-cast.rs:6:4 947 | 948LL | fn foo<N>(_x: N) {} 949 | ^^^ ----- 950help: you can convert an `i16` to an `i32` 951 | 952LL | foo::<i32>(x_i16.into()); 953 | +++++++ 954 955error[E0308]: mismatched types 956 --> $DIR/numeric-cast.rs:149:16 957 | 958LL | foo::<i32>(x_i8); 959 | ---------- ^^^^ expected `i32`, found `i8` 960 | | 961 | arguments to this function are incorrect 962 | 963note: function defined here 964 --> $DIR/numeric-cast.rs:6:4 965 | 966LL | fn foo<N>(_x: N) {} 967 | ^^^ ----- 968help: you can convert an `i8` to an `i32` 969 | 970LL | foo::<i32>(x_i8.into()); 971 | +++++++ 972 973error[E0308]: mismatched types 974 --> $DIR/numeric-cast.rs:154:16 975 | 976LL | foo::<u16>(x_usize); 977 | ---------- ^^^^^^^ expected `u16`, found `usize` 978 | | 979 | arguments to this function are incorrect 980 | 981note: function defined here 982 --> $DIR/numeric-cast.rs:6:4 983 | 984LL | fn foo<N>(_x: N) {} 985 | ^^^ ----- 986help: you can convert a `usize` to a `u16` and panic if the converted value doesn't fit 987 | 988LL | foo::<u16>(x_usize.try_into().unwrap()); 989 | ++++++++++++++++++++ 990 991error[E0308]: mismatched types 992 --> $DIR/numeric-cast.rs:156:16 993 | 994LL | foo::<u16>(x_u64); 995 | ---------- ^^^^^ expected `u16`, found `u64` 996 | | 997 | arguments to this function are incorrect 998 | 999note: function defined here 1000 --> $DIR/numeric-cast.rs:6:4 1001 | 1002LL | fn foo<N>(_x: N) {} 1003 | ^^^ ----- 1004help: you can convert a `u64` to a `u16` and panic if the converted value doesn't fit 1005 | 1006LL | foo::<u16>(x_u64.try_into().unwrap()); 1007 | ++++++++++++++++++++ 1008 1009error[E0308]: mismatched types 1010 --> $DIR/numeric-cast.rs:158:16 1011 | 1012LL | foo::<u16>(x_u32); 1013 | ---------- ^^^^^ expected `u16`, found `u32` 1014 | | 1015 | arguments to this function are incorrect 1016 | 1017note: function defined here 1018 --> $DIR/numeric-cast.rs:6:4 1019 | 1020LL | fn foo<N>(_x: N) {} 1021 | ^^^ ----- 1022help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit 1023 | 1024LL | foo::<u16>(x_u32.try_into().unwrap()); 1025 | ++++++++++++++++++++ 1026 1027error[E0308]: mismatched types 1028 --> $DIR/numeric-cast.rs:161:16 1029 | 1030LL | foo::<u16>(x_u8); 1031 | ---------- ^^^^ expected `u16`, found `u8` 1032 | | 1033 | arguments to this function are incorrect 1034 | 1035note: function defined here 1036 --> $DIR/numeric-cast.rs:6:4 1037 | 1038LL | fn foo<N>(_x: N) {} 1039 | ^^^ ----- 1040help: you can convert a `u8` to a `u16` 1041 | 1042LL | foo::<u16>(x_u8.into()); 1043 | +++++++ 1044 1045error[E0308]: mismatched types 1046 --> $DIR/numeric-cast.rs:163:16 1047 | 1048LL | foo::<u16>(x_isize); 1049 | ---------- ^^^^^^^ expected `u16`, found `isize` 1050 | | 1051 | arguments to this function are incorrect 1052 | 1053note: function defined here 1054 --> $DIR/numeric-cast.rs:6:4 1055 | 1056LL | fn foo<N>(_x: N) {} 1057 | ^^^ ----- 1058help: you can convert an `isize` to a `u16` and panic if the converted value doesn't fit 1059 | 1060LL | foo::<u16>(x_isize.try_into().unwrap()); 1061 | ++++++++++++++++++++ 1062 1063error[E0308]: mismatched types 1064 --> $DIR/numeric-cast.rs:165:16 1065 | 1066LL | foo::<u16>(x_i64); 1067 | ---------- ^^^^^ expected `u16`, found `i64` 1068 | | 1069 | arguments to this function are incorrect 1070 | 1071note: function defined here 1072 --> $DIR/numeric-cast.rs:6:4 1073 | 1074LL | fn foo<N>(_x: N) {} 1075 | ^^^ ----- 1076help: you can convert an `i64` to a `u16` and panic if the converted value doesn't fit 1077 | 1078LL | foo::<u16>(x_i64.try_into().unwrap()); 1079 | ++++++++++++++++++++ 1080 1081error[E0308]: mismatched types 1082 --> $DIR/numeric-cast.rs:167:16 1083 | 1084LL | foo::<u16>(x_i32); 1085 | ---------- ^^^^^ expected `u16`, found `i32` 1086 | | 1087 | arguments to this function are incorrect 1088 | 1089note: function defined here 1090 --> $DIR/numeric-cast.rs:6:4 1091 | 1092LL | fn foo<N>(_x: N) {} 1093 | ^^^ ----- 1094help: you can convert an `i32` to a `u16` and panic if the converted value doesn't fit 1095 | 1096LL | foo::<u16>(x_i32.try_into().unwrap()); 1097 | ++++++++++++++++++++ 1098 1099error[E0308]: mismatched types 1100 --> $DIR/numeric-cast.rs:169:16 1101 | 1102LL | foo::<u16>(x_i16); 1103 | ---------- ^^^^^ expected `u16`, found `i16` 1104 | | 1105 | arguments to this function are incorrect 1106 | 1107note: function defined here 1108 --> $DIR/numeric-cast.rs:6:4 1109 | 1110LL | fn foo<N>(_x: N) {} 1111 | ^^^ ----- 1112help: you can convert an `i16` to a `u16` and panic if the converted value doesn't fit 1113 | 1114LL | foo::<u16>(x_i16.try_into().unwrap()); 1115 | ++++++++++++++++++++ 1116 1117error[E0308]: mismatched types 1118 --> $DIR/numeric-cast.rs:171:16 1119 | 1120LL | foo::<u16>(x_i8); 1121 | ---------- ^^^^ expected `u16`, found `i8` 1122 | | 1123 | arguments to this function are incorrect 1124 | 1125note: function defined here 1126 --> $DIR/numeric-cast.rs:6:4 1127 | 1128LL | fn foo<N>(_x: N) {} 1129 | ^^^ ----- 1130help: you can convert an `i8` to a `u16` and panic if the converted value doesn't fit 1131 | 1132LL | foo::<u16>(x_i8.try_into().unwrap()); 1133 | ++++++++++++++++++++ 1134 1135error[E0308]: mismatched types 1136 --> $DIR/numeric-cast.rs:176:16 1137 | 1138LL | foo::<i16>(x_usize); 1139 | ---------- ^^^^^^^ expected `i16`, found `usize` 1140 | | 1141 | arguments to this function are incorrect 1142 | 1143note: function defined here 1144 --> $DIR/numeric-cast.rs:6:4 1145 | 1146LL | fn foo<N>(_x: N) {} 1147 | ^^^ ----- 1148help: you can convert a `usize` to an `i16` and panic if the converted value doesn't fit 1149 | 1150LL | foo::<i16>(x_usize.try_into().unwrap()); 1151 | ++++++++++++++++++++ 1152 1153error[E0308]: mismatched types 1154 --> $DIR/numeric-cast.rs:178:16 1155 | 1156LL | foo::<i16>(x_u64); 1157 | ---------- ^^^^^ expected `i16`, found `u64` 1158 | | 1159 | arguments to this function are incorrect 1160 | 1161note: function defined here 1162 --> $DIR/numeric-cast.rs:6:4 1163 | 1164LL | fn foo<N>(_x: N) {} 1165 | ^^^ ----- 1166help: you can convert a `u64` to an `i16` and panic if the converted value doesn't fit 1167 | 1168LL | foo::<i16>(x_u64.try_into().unwrap()); 1169 | ++++++++++++++++++++ 1170 1171error[E0308]: mismatched types 1172 --> $DIR/numeric-cast.rs:180:16 1173 | 1174LL | foo::<i16>(x_u32); 1175 | ---------- ^^^^^ expected `i16`, found `u32` 1176 | | 1177 | arguments to this function are incorrect 1178 | 1179note: function defined here 1180 --> $DIR/numeric-cast.rs:6:4 1181 | 1182LL | fn foo<N>(_x: N) {} 1183 | ^^^ ----- 1184help: you can convert a `u32` to an `i16` and panic if the converted value doesn't fit 1185 | 1186LL | foo::<i16>(x_u32.try_into().unwrap()); 1187 | ++++++++++++++++++++ 1188 1189error[E0308]: mismatched types 1190 --> $DIR/numeric-cast.rs:182:16 1191 | 1192LL | foo::<i16>(x_u16); 1193 | ---------- ^^^^^ expected `i16`, found `u16` 1194 | | 1195 | arguments to this function are incorrect 1196 | 1197note: function defined here 1198 --> $DIR/numeric-cast.rs:6:4 1199 | 1200LL | fn foo<N>(_x: N) {} 1201 | ^^^ ----- 1202help: you can convert a `u16` to an `i16` and panic if the converted value doesn't fit 1203 | 1204LL | foo::<i16>(x_u16.try_into().unwrap()); 1205 | ++++++++++++++++++++ 1206 1207error[E0308]: mismatched types 1208 --> $DIR/numeric-cast.rs:184:16 1209 | 1210LL | foo::<i16>(x_u8); 1211 | ---------- ^^^^ expected `i16`, found `u8` 1212 | | 1213 | arguments to this function are incorrect 1214 | 1215note: function defined here 1216 --> $DIR/numeric-cast.rs:6:4 1217 | 1218LL | fn foo<N>(_x: N) {} 1219 | ^^^ ----- 1220help: you can convert a `u8` to an `i16` 1221 | 1222LL | foo::<i16>(x_u8.into()); 1223 | +++++++ 1224 1225error[E0308]: mismatched types 1226 --> $DIR/numeric-cast.rs:186:16 1227 | 1228LL | foo::<i16>(x_isize); 1229 | ---------- ^^^^^^^ expected `i16`, found `isize` 1230 | | 1231 | arguments to this function are incorrect 1232 | 1233note: function defined here 1234 --> $DIR/numeric-cast.rs:6:4 1235 | 1236LL | fn foo<N>(_x: N) {} 1237 | ^^^ ----- 1238help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit 1239 | 1240LL | foo::<i16>(x_isize.try_into().unwrap()); 1241 | ++++++++++++++++++++ 1242 1243error[E0308]: mismatched types 1244 --> $DIR/numeric-cast.rs:188:16 1245 | 1246LL | foo::<i16>(x_i64); 1247 | ---------- ^^^^^ expected `i16`, found `i64` 1248 | | 1249 | arguments to this function are incorrect 1250 | 1251note: function defined here 1252 --> $DIR/numeric-cast.rs:6:4 1253 | 1254LL | fn foo<N>(_x: N) {} 1255 | ^^^ ----- 1256help: you can convert an `i64` to an `i16` and panic if the converted value doesn't fit 1257 | 1258LL | foo::<i16>(x_i64.try_into().unwrap()); 1259 | ++++++++++++++++++++ 1260 1261error[E0308]: mismatched types 1262 --> $DIR/numeric-cast.rs:190:16 1263 | 1264LL | foo::<i16>(x_i32); 1265 | ---------- ^^^^^ expected `i16`, found `i32` 1266 | | 1267 | arguments to this function are incorrect 1268 | 1269note: function defined here 1270 --> $DIR/numeric-cast.rs:6:4 1271 | 1272LL | fn foo<N>(_x: N) {} 1273 | ^^^ ----- 1274help: you can convert an `i32` to an `i16` and panic if the converted value doesn't fit 1275 | 1276LL | foo::<i16>(x_i32.try_into().unwrap()); 1277 | ++++++++++++++++++++ 1278 1279error[E0308]: mismatched types 1280 --> $DIR/numeric-cast.rs:193:16 1281 | 1282LL | foo::<i16>(x_i8); 1283 | ---------- ^^^^ expected `i16`, found `i8` 1284 | | 1285 | arguments to this function are incorrect 1286 | 1287note: function defined here 1288 --> $DIR/numeric-cast.rs:6:4 1289 | 1290LL | fn foo<N>(_x: N) {} 1291 | ^^^ ----- 1292help: you can convert an `i8` to an `i16` 1293 | 1294LL | foo::<i16>(x_i8.into()); 1295 | +++++++ 1296 1297error[E0308]: mismatched types 1298 --> $DIR/numeric-cast.rs:198:15 1299 | 1300LL | foo::<u8>(x_usize); 1301 | --------- ^^^^^^^ expected `u8`, found `usize` 1302 | | 1303 | arguments to this function are incorrect 1304 | 1305note: function defined here 1306 --> $DIR/numeric-cast.rs:6:4 1307 | 1308LL | fn foo<N>(_x: N) {} 1309 | ^^^ ----- 1310help: you can convert a `usize` to a `u8` and panic if the converted value doesn't fit 1311 | 1312LL | foo::<u8>(x_usize.try_into().unwrap()); 1313 | ++++++++++++++++++++ 1314 1315error[E0308]: mismatched types 1316 --> $DIR/numeric-cast.rs:200:15 1317 | 1318LL | foo::<u8>(x_u64); 1319 | --------- ^^^^^ expected `u8`, found `u64` 1320 | | 1321 | arguments to this function are incorrect 1322 | 1323note: function defined here 1324 --> $DIR/numeric-cast.rs:6:4 1325 | 1326LL | fn foo<N>(_x: N) {} 1327 | ^^^ ----- 1328help: you can convert a `u64` to a `u8` and panic if the converted value doesn't fit 1329 | 1330LL | foo::<u8>(x_u64.try_into().unwrap()); 1331 | ++++++++++++++++++++ 1332 1333error[E0308]: mismatched types 1334 --> $DIR/numeric-cast.rs:202:15 1335 | 1336LL | foo::<u8>(x_u32); 1337 | --------- ^^^^^ expected `u8`, found `u32` 1338 | | 1339 | arguments to this function are incorrect 1340 | 1341note: function defined here 1342 --> $DIR/numeric-cast.rs:6:4 1343 | 1344LL | fn foo<N>(_x: N) {} 1345 | ^^^ ----- 1346help: you can convert a `u32` to a `u8` and panic if the converted value doesn't fit 1347 | 1348LL | foo::<u8>(x_u32.try_into().unwrap()); 1349 | ++++++++++++++++++++ 1350 1351error[E0308]: mismatched types 1352 --> $DIR/numeric-cast.rs:204:15 1353 | 1354LL | foo::<u8>(x_u16); 1355 | --------- ^^^^^ expected `u8`, found `u16` 1356 | | 1357 | arguments to this function are incorrect 1358 | 1359note: function defined here 1360 --> $DIR/numeric-cast.rs:6:4 1361 | 1362LL | fn foo<N>(_x: N) {} 1363 | ^^^ ----- 1364help: you can convert a `u16` to a `u8` and panic if the converted value doesn't fit 1365 | 1366LL | foo::<u8>(x_u16.try_into().unwrap()); 1367 | ++++++++++++++++++++ 1368 1369error[E0308]: mismatched types 1370 --> $DIR/numeric-cast.rs:207:15 1371 | 1372LL | foo::<u8>(x_isize); 1373 | --------- ^^^^^^^ expected `u8`, found `isize` 1374 | | 1375 | arguments to this function are incorrect 1376 | 1377note: function defined here 1378 --> $DIR/numeric-cast.rs:6:4 1379 | 1380LL | fn foo<N>(_x: N) {} 1381 | ^^^ ----- 1382help: you can convert an `isize` to a `u8` and panic if the converted value doesn't fit 1383 | 1384LL | foo::<u8>(x_isize.try_into().unwrap()); 1385 | ++++++++++++++++++++ 1386 1387error[E0308]: mismatched types 1388 --> $DIR/numeric-cast.rs:209:15 1389 | 1390LL | foo::<u8>(x_i64); 1391 | --------- ^^^^^ expected `u8`, found `i64` 1392 | | 1393 | arguments to this function are incorrect 1394 | 1395note: function defined here 1396 --> $DIR/numeric-cast.rs:6:4 1397 | 1398LL | fn foo<N>(_x: N) {} 1399 | ^^^ ----- 1400help: you can convert an `i64` to a `u8` and panic if the converted value doesn't fit 1401 | 1402LL | foo::<u8>(x_i64.try_into().unwrap()); 1403 | ++++++++++++++++++++ 1404 1405error[E0308]: mismatched types 1406 --> $DIR/numeric-cast.rs:211:15 1407 | 1408LL | foo::<u8>(x_i32); 1409 | --------- ^^^^^ expected `u8`, found `i32` 1410 | | 1411 | arguments to this function are incorrect 1412 | 1413note: function defined here 1414 --> $DIR/numeric-cast.rs:6:4 1415 | 1416LL | fn foo<N>(_x: N) {} 1417 | ^^^ ----- 1418help: you can convert an `i32` to a `u8` and panic if the converted value doesn't fit 1419 | 1420LL | foo::<u8>(x_i32.try_into().unwrap()); 1421 | ++++++++++++++++++++ 1422 1423error[E0308]: mismatched types 1424 --> $DIR/numeric-cast.rs:213:15 1425 | 1426LL | foo::<u8>(x_i16); 1427 | --------- ^^^^^ expected `u8`, found `i16` 1428 | | 1429 | arguments to this function are incorrect 1430 | 1431note: function defined here 1432 --> $DIR/numeric-cast.rs:6:4 1433 | 1434LL | fn foo<N>(_x: N) {} 1435 | ^^^ ----- 1436help: you can convert an `i16` to a `u8` and panic if the converted value doesn't fit 1437 | 1438LL | foo::<u8>(x_i16.try_into().unwrap()); 1439 | ++++++++++++++++++++ 1440 1441error[E0308]: mismatched types 1442 --> $DIR/numeric-cast.rs:215:15 1443 | 1444LL | foo::<u8>(x_i8); 1445 | --------- ^^^^ expected `u8`, found `i8` 1446 | | 1447 | arguments to this function are incorrect 1448 | 1449note: function defined here 1450 --> $DIR/numeric-cast.rs:6:4 1451 | 1452LL | fn foo<N>(_x: N) {} 1453 | ^^^ ----- 1454help: you can convert an `i8` to a `u8` and panic if the converted value doesn't fit 1455 | 1456LL | foo::<u8>(x_i8.try_into().unwrap()); 1457 | ++++++++++++++++++++ 1458 1459error[E0308]: mismatched types 1460 --> $DIR/numeric-cast.rs:220:15 1461 | 1462LL | foo::<i8>(x_usize); 1463 | --------- ^^^^^^^ expected `i8`, found `usize` 1464 | | 1465 | arguments to this function are incorrect 1466 | 1467note: function defined here 1468 --> $DIR/numeric-cast.rs:6:4 1469 | 1470LL | fn foo<N>(_x: N) {} 1471 | ^^^ ----- 1472help: you can convert a `usize` to an `i8` and panic if the converted value doesn't fit 1473 | 1474LL | foo::<i8>(x_usize.try_into().unwrap()); 1475 | ++++++++++++++++++++ 1476 1477error[E0308]: mismatched types 1478 --> $DIR/numeric-cast.rs:222:15 1479 | 1480LL | foo::<i8>(x_u64); 1481 | --------- ^^^^^ expected `i8`, found `u64` 1482 | | 1483 | arguments to this function are incorrect 1484 | 1485note: function defined here 1486 --> $DIR/numeric-cast.rs:6:4 1487 | 1488LL | fn foo<N>(_x: N) {} 1489 | ^^^ ----- 1490help: you can convert a `u64` to an `i8` and panic if the converted value doesn't fit 1491 | 1492LL | foo::<i8>(x_u64.try_into().unwrap()); 1493 | ++++++++++++++++++++ 1494 1495error[E0308]: mismatched types 1496 --> $DIR/numeric-cast.rs:224:15 1497 | 1498LL | foo::<i8>(x_u32); 1499 | --------- ^^^^^ expected `i8`, found `u32` 1500 | | 1501 | arguments to this function are incorrect 1502 | 1503note: function defined here 1504 --> $DIR/numeric-cast.rs:6:4 1505 | 1506LL | fn foo<N>(_x: N) {} 1507 | ^^^ ----- 1508help: you can convert a `u32` to an `i8` and panic if the converted value doesn't fit 1509 | 1510LL | foo::<i8>(x_u32.try_into().unwrap()); 1511 | ++++++++++++++++++++ 1512 1513error[E0308]: mismatched types 1514 --> $DIR/numeric-cast.rs:226:15 1515 | 1516LL | foo::<i8>(x_u16); 1517 | --------- ^^^^^ expected `i8`, found `u16` 1518 | | 1519 | arguments to this function are incorrect 1520 | 1521note: function defined here 1522 --> $DIR/numeric-cast.rs:6:4 1523 | 1524LL | fn foo<N>(_x: N) {} 1525 | ^^^ ----- 1526help: you can convert a `u16` to an `i8` and panic if the converted value doesn't fit 1527 | 1528LL | foo::<i8>(x_u16.try_into().unwrap()); 1529 | ++++++++++++++++++++ 1530 1531error[E0308]: mismatched types 1532 --> $DIR/numeric-cast.rs:228:15 1533 | 1534LL | foo::<i8>(x_u8); 1535 | --------- ^^^^ expected `i8`, found `u8` 1536 | | 1537 | arguments to this function are incorrect 1538 | 1539note: function defined here 1540 --> $DIR/numeric-cast.rs:6:4 1541 | 1542LL | fn foo<N>(_x: N) {} 1543 | ^^^ ----- 1544help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit 1545 | 1546LL | foo::<i8>(x_u8.try_into().unwrap()); 1547 | ++++++++++++++++++++ 1548 1549error[E0308]: mismatched types 1550 --> $DIR/numeric-cast.rs:230:15 1551 | 1552LL | foo::<i8>(x_isize); 1553 | --------- ^^^^^^^ expected `i8`, found `isize` 1554 | | 1555 | arguments to this function are incorrect 1556 | 1557note: function defined here 1558 --> $DIR/numeric-cast.rs:6:4 1559 | 1560LL | fn foo<N>(_x: N) {} 1561 | ^^^ ----- 1562help: you can convert an `isize` to an `i8` and panic if the converted value doesn't fit 1563 | 1564LL | foo::<i8>(x_isize.try_into().unwrap()); 1565 | ++++++++++++++++++++ 1566 1567error[E0308]: mismatched types 1568 --> $DIR/numeric-cast.rs:232:15 1569 | 1570LL | foo::<i8>(x_i64); 1571 | --------- ^^^^^ expected `i8`, found `i64` 1572 | | 1573 | arguments to this function are incorrect 1574 | 1575note: function defined here 1576 --> $DIR/numeric-cast.rs:6:4 1577 | 1578LL | fn foo<N>(_x: N) {} 1579 | ^^^ ----- 1580help: you can convert an `i64` to an `i8` and panic if the converted value doesn't fit 1581 | 1582LL | foo::<i8>(x_i64.try_into().unwrap()); 1583 | ++++++++++++++++++++ 1584 1585error[E0308]: mismatched types 1586 --> $DIR/numeric-cast.rs:234:15 1587 | 1588LL | foo::<i8>(x_i32); 1589 | --------- ^^^^^ expected `i8`, found `i32` 1590 | | 1591 | arguments to this function are incorrect 1592 | 1593note: function defined here 1594 --> $DIR/numeric-cast.rs:6:4 1595 | 1596LL | fn foo<N>(_x: N) {} 1597 | ^^^ ----- 1598help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit 1599 | 1600LL | foo::<i8>(x_i32.try_into().unwrap()); 1601 | ++++++++++++++++++++ 1602 1603error[E0308]: mismatched types 1604 --> $DIR/numeric-cast.rs:236:15 1605 | 1606LL | foo::<i8>(x_i16); 1607 | --------- ^^^^^ expected `i8`, found `i16` 1608 | | 1609 | arguments to this function are incorrect 1610 | 1611note: function defined here 1612 --> $DIR/numeric-cast.rs:6:4 1613 | 1614LL | fn foo<N>(_x: N) {} 1615 | ^^^ ----- 1616help: you can convert an `i16` to an `i8` and panic if the converted value doesn't fit 1617 | 1618LL | foo::<i8>(x_i16.try_into().unwrap()); 1619 | ++++++++++++++++++++ 1620 1621error[E0308]: mismatched types 1622 --> $DIR/numeric-cast.rs:242:16 1623 | 1624LL | foo::<f64>(x_usize); 1625 | ---------- ^^^^^^^ expected `f64`, found `usize` 1626 | | 1627 | arguments to this function are incorrect 1628 | 1629note: function defined here 1630 --> $DIR/numeric-cast.rs:6:4 1631 | 1632LL | fn foo<N>(_x: N) {} 1633 | ^^^ ----- 1634help: you can cast a `usize` to an `f64`, producing the floating point representation of the integer, rounded if necessary 1635 | 1636LL | foo::<f64>(x_usize as f64); 1637 | ++++++ 1638 1639error[E0308]: mismatched types 1640 --> $DIR/numeric-cast.rs:244:16 1641 | 1642LL | foo::<f64>(x_u64); 1643 | ---------- ^^^^^ expected `f64`, found `u64` 1644 | | 1645 | arguments to this function are incorrect 1646 | 1647note: function defined here 1648 --> $DIR/numeric-cast.rs:6:4 1649 | 1650LL | fn foo<N>(_x: N) {} 1651 | ^^^ ----- 1652help: you can cast a `u64` to an `f64`, producing the floating point representation of the integer, rounded if necessary 1653 | 1654LL | foo::<f64>(x_u64 as f64); 1655 | ++++++ 1656 1657error[E0308]: mismatched types 1658 --> $DIR/numeric-cast.rs:246:16 1659 | 1660LL | foo::<f64>(x_u32); 1661 | ---------- ^^^^^ expected `f64`, found `u32` 1662 | | 1663 | arguments to this function are incorrect 1664 | 1665note: function defined here 1666 --> $DIR/numeric-cast.rs:6:4 1667 | 1668LL | fn foo<N>(_x: N) {} 1669 | ^^^ ----- 1670help: you can convert a `u32` to an `f64`, producing the floating point representation of the integer 1671 | 1672LL | foo::<f64>(x_u32.into()); 1673 | +++++++ 1674 1675error[E0308]: mismatched types 1676 --> $DIR/numeric-cast.rs:248:16 1677 | 1678LL | foo::<f64>(x_u16); 1679 | ---------- ^^^^^ expected `f64`, found `u16` 1680 | | 1681 | arguments to this function are incorrect 1682 | 1683note: function defined here 1684 --> $DIR/numeric-cast.rs:6:4 1685 | 1686LL | fn foo<N>(_x: N) {} 1687 | ^^^ ----- 1688help: you can convert a `u16` to an `f64`, producing the floating point representation of the integer 1689 | 1690LL | foo::<f64>(x_u16.into()); 1691 | +++++++ 1692 1693error[E0308]: mismatched types 1694 --> $DIR/numeric-cast.rs:250:16 1695 | 1696LL | foo::<f64>(x_u8); 1697 | ---------- ^^^^ expected `f64`, found `u8` 1698 | | 1699 | arguments to this function are incorrect 1700 | 1701note: function defined here 1702 --> $DIR/numeric-cast.rs:6:4 1703 | 1704LL | fn foo<N>(_x: N) {} 1705 | ^^^ ----- 1706help: you can convert a `u8` to an `f64`, producing the floating point representation of the integer 1707 | 1708LL | foo::<f64>(x_u8.into()); 1709 | +++++++ 1710 1711error[E0308]: mismatched types 1712 --> $DIR/numeric-cast.rs:252:16 1713 | 1714LL | foo::<f64>(x_isize); 1715 | ---------- ^^^^^^^ expected `f64`, found `isize` 1716 | | 1717 | arguments to this function are incorrect 1718 | 1719note: function defined here 1720 --> $DIR/numeric-cast.rs:6:4 1721 | 1722LL | fn foo<N>(_x: N) {} 1723 | ^^^ ----- 1724help: you can convert an `isize` to an `f64`, producing the floating point representation of the integer, rounded if necessary 1725 | 1726LL | foo::<f64>(x_isize as f64); 1727 | ++++++ 1728 1729error[E0308]: mismatched types 1730 --> $DIR/numeric-cast.rs:254:16 1731 | 1732LL | foo::<f64>(x_i64); 1733 | ---------- ^^^^^ expected `f64`, found `i64` 1734 | | 1735 | arguments to this function are incorrect 1736 | 1737note: function defined here 1738 --> $DIR/numeric-cast.rs:6:4 1739 | 1740LL | fn foo<N>(_x: N) {} 1741 | ^^^ ----- 1742help: you can convert an `i64` to an `f64`, producing the floating point representation of the integer, rounded if necessary 1743 | 1744LL | foo::<f64>(x_i64 as f64); 1745 | ++++++ 1746 1747error[E0308]: mismatched types 1748 --> $DIR/numeric-cast.rs:256:16 1749 | 1750LL | foo::<f64>(x_i32); 1751 | ---------- ^^^^^ expected `f64`, found `i32` 1752 | | 1753 | arguments to this function are incorrect 1754 | 1755note: function defined here 1756 --> $DIR/numeric-cast.rs:6:4 1757 | 1758LL | fn foo<N>(_x: N) {} 1759 | ^^^ ----- 1760help: you can convert an `i32` to an `f64`, producing the floating point representation of the integer 1761 | 1762LL | foo::<f64>(x_i32.into()); 1763 | +++++++ 1764 1765error[E0308]: mismatched types 1766 --> $DIR/numeric-cast.rs:258:16 1767 | 1768LL | foo::<f64>(x_i16); 1769 | ---------- ^^^^^ expected `f64`, found `i16` 1770 | | 1771 | arguments to this function are incorrect 1772 | 1773note: function defined here 1774 --> $DIR/numeric-cast.rs:6:4 1775 | 1776LL | fn foo<N>(_x: N) {} 1777 | ^^^ ----- 1778help: you can convert an `i16` to an `f64`, producing the floating point representation of the integer 1779 | 1780LL | foo::<f64>(x_i16.into()); 1781 | +++++++ 1782 1783error[E0308]: mismatched types 1784 --> $DIR/numeric-cast.rs:260:16 1785 | 1786LL | foo::<f64>(x_i8); 1787 | ---------- ^^^^ expected `f64`, found `i8` 1788 | | 1789 | arguments to this function are incorrect 1790 | 1791note: function defined here 1792 --> $DIR/numeric-cast.rs:6:4 1793 | 1794LL | fn foo<N>(_x: N) {} 1795 | ^^^ ----- 1796help: you can convert an `i8` to an `f64`, producing the floating point representation of the integer 1797 | 1798LL | foo::<f64>(x_i8.into()); 1799 | +++++++ 1800 1801error[E0308]: mismatched types 1802 --> $DIR/numeric-cast.rs:263:16 1803 | 1804LL | foo::<f64>(x_f32); 1805 | ---------- ^^^^^ expected `f64`, found `f32` 1806 | | 1807 | arguments to this function are incorrect 1808 | 1809note: function defined here 1810 --> $DIR/numeric-cast.rs:6:4 1811 | 1812LL | fn foo<N>(_x: N) {} 1813 | ^^^ ----- 1814help: you can convert an `f32` to an `f64` 1815 | 1816LL | foo::<f64>(x_f32.into()); 1817 | +++++++ 1818 1819error[E0308]: mismatched types 1820 --> $DIR/numeric-cast.rs:266:16 1821 | 1822LL | foo::<f32>(x_usize); 1823 | ---------- ^^^^^^^ expected `f32`, found `usize` 1824 | | 1825 | arguments to this function are incorrect 1826 | 1827note: function defined here 1828 --> $DIR/numeric-cast.rs:6:4 1829 | 1830LL | fn foo<N>(_x: N) {} 1831 | ^^^ ----- 1832help: you can cast a `usize` to an `f32`, producing the floating point representation of the integer, rounded if necessary 1833 | 1834LL | foo::<f32>(x_usize as f32); 1835 | ++++++ 1836 1837error[E0308]: mismatched types 1838 --> $DIR/numeric-cast.rs:268:16 1839 | 1840LL | foo::<f32>(x_u64); 1841 | ---------- ^^^^^ expected `f32`, found `u64` 1842 | | 1843 | arguments to this function are incorrect 1844 | 1845note: function defined here 1846 --> $DIR/numeric-cast.rs:6:4 1847 | 1848LL | fn foo<N>(_x: N) {} 1849 | ^^^ ----- 1850help: you can cast a `u64` to an `f32`, producing the floating point representation of the integer, rounded if necessary 1851 | 1852LL | foo::<f32>(x_u64 as f32); 1853 | ++++++ 1854 1855error[E0308]: mismatched types 1856 --> $DIR/numeric-cast.rs:270:16 1857 | 1858LL | foo::<f32>(x_u32); 1859 | ---------- ^^^^^ expected `f32`, found `u32` 1860 | | 1861 | arguments to this function are incorrect 1862 | 1863note: function defined here 1864 --> $DIR/numeric-cast.rs:6:4 1865 | 1866LL | fn foo<N>(_x: N) {} 1867 | ^^^ ----- 1868help: you can cast a `u32` to an `f32`, producing the floating point representation of the integer, rounded if necessary 1869 | 1870LL | foo::<f32>(x_u32 as f32); 1871 | ++++++ 1872 1873error[E0308]: mismatched types 1874 --> $DIR/numeric-cast.rs:272:16 1875 | 1876LL | foo::<f32>(x_u16); 1877 | ---------- ^^^^^ expected `f32`, found `u16` 1878 | | 1879 | arguments to this function are incorrect 1880 | 1881note: function defined here 1882 --> $DIR/numeric-cast.rs:6:4 1883 | 1884LL | fn foo<N>(_x: N) {} 1885 | ^^^ ----- 1886help: you can convert a `u16` to an `f32`, producing the floating point representation of the integer 1887 | 1888LL | foo::<f32>(x_u16.into()); 1889 | +++++++ 1890 1891error[E0308]: mismatched types 1892 --> $DIR/numeric-cast.rs:274:16 1893 | 1894LL | foo::<f32>(x_u8); 1895 | ---------- ^^^^ expected `f32`, found `u8` 1896 | | 1897 | arguments to this function are incorrect 1898 | 1899note: function defined here 1900 --> $DIR/numeric-cast.rs:6:4 1901 | 1902LL | fn foo<N>(_x: N) {} 1903 | ^^^ ----- 1904help: you can convert a `u8` to an `f32`, producing the floating point representation of the integer 1905 | 1906LL | foo::<f32>(x_u8.into()); 1907 | +++++++ 1908 1909error[E0308]: mismatched types 1910 --> $DIR/numeric-cast.rs:276:16 1911 | 1912LL | foo::<f32>(x_isize); 1913 | ---------- ^^^^^^^ expected `f32`, found `isize` 1914 | | 1915 | arguments to this function are incorrect 1916 | 1917note: function defined here 1918 --> $DIR/numeric-cast.rs:6:4 1919 | 1920LL | fn foo<N>(_x: N) {} 1921 | ^^^ ----- 1922help: you can convert an `isize` to an `f32`, producing the floating point representation of the integer, rounded if necessary 1923 | 1924LL | foo::<f32>(x_isize as f32); 1925 | ++++++ 1926 1927error[E0308]: mismatched types 1928 --> $DIR/numeric-cast.rs:278:16 1929 | 1930LL | foo::<f32>(x_i64); 1931 | ---------- ^^^^^ expected `f32`, found `i64` 1932 | | 1933 | arguments to this function are incorrect 1934 | 1935note: function defined here 1936 --> $DIR/numeric-cast.rs:6:4 1937 | 1938LL | fn foo<N>(_x: N) {} 1939 | ^^^ ----- 1940help: you can convert an `i64` to an `f32`, producing the floating point representation of the integer, rounded if necessary 1941 | 1942LL | foo::<f32>(x_i64 as f32); 1943 | ++++++ 1944 1945error[E0308]: mismatched types 1946 --> $DIR/numeric-cast.rs:280:16 1947 | 1948LL | foo::<f32>(x_i32); 1949 | ---------- ^^^^^ expected `f32`, found `i32` 1950 | | 1951 | arguments to this function are incorrect 1952 | 1953note: function defined here 1954 --> $DIR/numeric-cast.rs:6:4 1955 | 1956LL | fn foo<N>(_x: N) {} 1957 | ^^^ ----- 1958help: you can convert an `i32` to an `f32`, producing the floating point representation of the integer, rounded if necessary 1959 | 1960LL | foo::<f32>(x_i32 as f32); 1961 | ++++++ 1962 1963error[E0308]: mismatched types 1964 --> $DIR/numeric-cast.rs:282:16 1965 | 1966LL | foo::<f32>(x_i16); 1967 | ---------- ^^^^^ expected `f32`, found `i16` 1968 | | 1969 | arguments to this function are incorrect 1970 | 1971note: function defined here 1972 --> $DIR/numeric-cast.rs:6:4 1973 | 1974LL | fn foo<N>(_x: N) {} 1975 | ^^^ ----- 1976help: you can convert an `i16` to an `f32`, producing the floating point representation of the integer 1977 | 1978LL | foo::<f32>(x_i16.into()); 1979 | +++++++ 1980 1981error[E0308]: mismatched types 1982 --> $DIR/numeric-cast.rs:284:16 1983 | 1984LL | foo::<f32>(x_i8); 1985 | ---------- ^^^^ expected `f32`, found `i8` 1986 | | 1987 | arguments to this function are incorrect 1988 | 1989note: function defined here 1990 --> $DIR/numeric-cast.rs:6:4 1991 | 1992LL | fn foo<N>(_x: N) {} 1993 | ^^^ ----- 1994help: you can convert an `i8` to an `f32`, producing the floating point representation of the integer 1995 | 1996LL | foo::<f32>(x_i8.into()); 1997 | +++++++ 1998 1999error[E0308]: mismatched types 2000 --> $DIR/numeric-cast.rs:289:16 2001 | 2002LL | foo::<u32>(x_u8 as u16); 2003 | ---------- ^^^^^^^^^^^ expected `u32`, found `u16` 2004 | | 2005 | arguments to this function are incorrect 2006 | 2007note: function defined here 2008 --> $DIR/numeric-cast.rs:6:4 2009 | 2010LL | fn foo<N>(_x: N) {} 2011 | ^^^ ----- 2012help: you can convert a `u16` to a `u32` 2013 | 2014LL | foo::<u32>((x_u8 as u16).into()); 2015 | + ++++++++ 2016 2017error[E0308]: mismatched types 2018 --> $DIR/numeric-cast.rs:291:16 2019 | 2020LL | foo::<i32>(-x_i8); 2021 | ---------- ^^^^^ expected `i32`, found `i8` 2022 | | 2023 | arguments to this function are incorrect 2024 | 2025note: function defined here 2026 --> $DIR/numeric-cast.rs:6:4 2027 | 2028LL | fn foo<N>(_x: N) {} 2029 | ^^^ ----- 2030help: you can convert an `i8` to an `i32` 2031 | 2032LL | foo::<i32>((-x_i8).into()); 2033 | + ++++++++ 2034 2035error: aborting due to 113 previous errors 2036 2037For more information about this error, try `rustc --explain E0308`. 2038