diff options
| author | bors <bors@rust-lang.org> | 2021-09-13 16:31:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-09-13 16:31:12 +0000 |
| commit | 9bb77da74dac4768489127d21e32db19b59ada5b (patch) | |
| tree | 5bcc7471a627d3d440646060935da4dcfcfd501b /src/test/ui/numeric | |
| parent | b0ee4951f0289aa31e54b101c5706f220315e197 (diff) | |
| parent | 34d19634f5ae448ff3fb281b22306cc8cfa3ee8c (diff) | |
Auto merge of #87915 - estebank:fancy-spans, r=oli-obk
Use smaller spans for some structured suggestions Use more accurate suggestion spans for * argument parse error * fully qualified path * missing code block type * numeric casts
Diffstat (limited to 'src/test/ui/numeric')
| -rw-r--r-- | src/test/ui/numeric/const-scope.stderr | 8 | ||||
| -rw-r--r-- | src/test/ui/numeric/len.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/numeric/numeric-cast-2.stderr | 24 | ||||
| -rw-r--r-- | src/test/ui/numeric/numeric-cast-binop.stderr | 544 | ||||
| -rw-r--r-- | src/test/ui/numeric/numeric-cast-no-fix.stderr | 22 | ||||
| -rw-r--r-- | src/test/ui/numeric/numeric-cast.stderr | 434 | ||||
| -rw-r--r-- | src/test/ui/numeric/numeric-suffix.stderr | 284 |
7 files changed, 725 insertions, 593 deletions
diff --git a/src/test/ui/numeric/const-scope.stderr b/src/test/ui/numeric/const-scope.stderr index 6732391e1a1..4e4bcdf234d 100644 --- a/src/test/ui/numeric/const-scope.stderr +++ b/src/test/ui/numeric/const-scope.stderr @@ -7,7 +7,7 @@ LL | const C: i32 = 1i8; help: change the type of the numeric literal from `i8` to `i32` | LL | const C: i32 = 1i32; - | ~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/const-scope.rs:2:15 @@ -26,7 +26,7 @@ LL | let c: i32 = 1i8; help: change the type of the numeric literal from `i8` to `i32` | LL | let c: i32 = 1i32; - | ~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/const-scope.rs:6:17 @@ -47,7 +47,7 @@ LL | let c: i32 = 1i8; help: change the type of the numeric literal from `i8` to `i32` | LL | let c: i32 = 1i32; - | ~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/const-scope.rs:11:17 @@ -60,7 +60,7 @@ LL | let d: i8 = c; help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit | LL | let d: i8 = c.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error: aborting due to 6 previous errors diff --git a/src/test/ui/numeric/len.stderr b/src/test/ui/numeric/len.stderr index 9a3248c5720..6319c1ead24 100644 --- a/src/test/ui/numeric/len.stderr +++ b/src/test/ui/numeric/len.stderr @@ -7,7 +7,7 @@ LL | test(array.len()); help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit | LL | test(array.len().try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error: aborting due to previous error diff --git a/src/test/ui/numeric/numeric-cast-2.stderr b/src/test/ui/numeric/numeric-cast-2.stderr index 83d8ce5eea9..a7b342739aa 100644 --- a/src/test/ui/numeric/numeric-cast-2.stderr +++ b/src/test/ui/numeric/numeric-cast-2.stderr @@ -9,27 +9,33 @@ LL | let x: u16 = foo(); help: you can convert an `i32` to a `u16` and panic if the converted value doesn't fit | LL | let x: u16 = foo().try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-2.rs:7:18 | LL | let y: i64 = x + x; - | --- ^^^^^ - | | | - | | expected `i64`, found `u16` - | | help: you can convert a `u16` to an `i64`: `(x + x).into()` + | --- ^^^^^ expected `i64`, found `u16` + | | | expected due to this + | +help: you can convert a `u16` to an `i64` + | +LL | let y: i64 = (x + x).into(); + | + ++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-2.rs:9:18 | LL | let z: i32 = x + x; - | --- ^^^^^ - | | | - | | expected `i32`, found `u16` - | | help: you can convert a `u16` to an `i32`: `(x + x).into()` + | --- ^^^^^ expected `i32`, found `u16` + | | | expected due to this + | +help: you can convert a `u16` to an `i32` + | +LL | let z: i32 = (x + x).into(); + | + ++++++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/numeric/numeric-cast-binop.stderr b/src/test/ui/numeric/numeric-cast-binop.stderr index b0ff50748fe..2f58f164985 100644 --- a/src/test/ui/numeric/numeric-cast-binop.stderr +++ b/src/test/ui/numeric/numeric-cast-binop.stderr @@ -7,7 +7,7 @@ LL | x_u8 > x_u16; help: you can convert `x_u8` from `u8` to `u16`, matching the type of `x_u16` | LL | u16::from(x_u8) > x_u16; - | ~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:25:16 @@ -18,7 +18,7 @@ LL | x_u8 > x_u32; help: you can convert `x_u8` from `u8` to `u32`, matching the type of `x_u32` | LL | u32::from(x_u8) > x_u32; - | ~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:27:16 @@ -29,7 +29,7 @@ LL | x_u8 > x_u64; help: you can convert `x_u8` from `u8` to `u64`, matching the type of `x_u64` | LL | u64::from(x_u8) > x_u64; - | ~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:29:16 @@ -40,7 +40,7 @@ LL | x_u8 > x_u128; help: you can convert `x_u8` from `u8` to `u128`, matching the type of `x_u128` | LL | u128::from(x_u8) > x_u128; - | ~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:31:16 @@ -51,16 +51,18 @@ LL | x_u8 > x_usize; help: you can convert `x_u8` from `u8` to `usize`, matching the type of `x_usize` | LL | usize::from(x_u8) > x_usize; - | ~~~~~~~~~~~~~~~~~ + | ++++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:34:17 | LL | x_u16 > x_u8; - | ^^^^ - | | - | expected `u16`, found `u8` - | help: you can convert a `u8` to a `u16`: `x_u8.into()` + | ^^^^ expected `u16`, found `u8` + | +help: you can convert a `u8` to a `u16` + | +LL | x_u16 > x_u8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:36:17 @@ -71,7 +73,7 @@ LL | x_u16 > x_u32; help: you can convert `x_u16` from `u16` to `u32`, matching the type of `x_u32` | LL | u32::from(x_u16) > x_u32; - | ~~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:38:17 @@ -82,7 +84,7 @@ LL | x_u16 > x_u64; help: you can convert `x_u16` from `u16` to `u64`, matching the type of `x_u64` | LL | u64::from(x_u16) > x_u64; - | ~~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:40:17 @@ -93,7 +95,7 @@ LL | x_u16 > x_u128; help: you can convert `x_u16` from `u16` to `u128`, matching the type of `x_u128` | LL | u128::from(x_u16) > x_u128; - | ~~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:42:17 @@ -104,25 +106,29 @@ LL | x_u16 > x_usize; help: you can convert `x_u16` from `u16` to `usize`, matching the type of `x_usize` | LL | usize::from(x_u16) > x_usize; - | ~~~~~~~~~~~~~~~~~~ + | ++++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:45:17 | LL | x_u32 > x_u8; - | ^^^^ - | | - | expected `u32`, found `u8` - | help: you can convert a `u8` to a `u32`: `x_u8.into()` + | ^^^^ expected `u32`, found `u8` + | +help: you can convert a `u8` to a `u32` + | +LL | x_u32 > x_u8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:47:17 | LL | x_u32 > x_u16; - | ^^^^^ - | | - | expected `u32`, found `u16` - | help: you can convert a `u16` to a `u32`: `x_u16.into()` + | ^^^^^ expected `u32`, found `u16` + | +help: you can convert a `u16` to a `u32` + | +LL | x_u32 > x_u16.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:49:17 @@ -133,7 +139,7 @@ LL | x_u32 > x_u64; help: you can convert `x_u32` from `u32` to `u64`, matching the type of `x_u64` | LL | u64::from(x_u32) > x_u64; - | ~~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:51:17 @@ -144,7 +150,7 @@ LL | x_u32 > x_u128; help: you can convert `x_u32` from `u32` to `u128`, matching the type of `x_u128` | LL | u128::from(x_u32) > x_u128; - | ~~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:53:17 @@ -155,34 +161,40 @@ LL | x_u32 > x_usize; help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit | LL | x_u32 > x_usize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:56:17 | LL | x_u64 > x_u8; - | ^^^^ - | | - | expected `u64`, found `u8` - | help: you can convert a `u8` to a `u64`: `x_u8.into()` + | ^^^^ expected `u64`, found `u8` + | +help: you can convert a `u8` to a `u64` + | +LL | x_u64 > x_u8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:58:17 | LL | x_u64 > x_u16; - | ^^^^^ - | | - | expected `u64`, found `u16` - | help: you can convert a `u16` to a `u64`: `x_u16.into()` + | ^^^^^ expected `u64`, found `u16` + | +help: you can convert a `u16` to a `u64` + | +LL | x_u64 > x_u16.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:60:17 | LL | x_u64 > x_u32; - | ^^^^^ - | | - | expected `u64`, found `u32` - | help: you can convert a `u32` to a `u64`: `x_u32.into()` + | ^^^^^ expected `u64`, found `u32` + | +help: you can convert a `u32` to a `u64` + | +LL | x_u64 > x_u32.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:62:17 @@ -193,7 +205,7 @@ LL | x_u64 > x_u128; help: you can convert `x_u64` from `u64` to `u128`, matching the type of `x_u128` | LL | u128::from(x_u64) > x_u128; - | ~~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:64:17 @@ -204,43 +216,51 @@ LL | x_u64 > x_usize; help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit | LL | x_u64 > x_usize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:67:18 | LL | x_u128 > x_u8; - | ^^^^ - | | - | expected `u128`, found `u8` - | help: you can convert a `u8` to a `u128`: `x_u8.into()` + | ^^^^ expected `u128`, found `u8` + | +help: you can convert a `u8` to a `u128` + | +LL | x_u128 > x_u8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:69:18 | LL | x_u128 > x_u16; - | ^^^^^ - | | - | expected `u128`, found `u16` - | help: you can convert a `u16` to a `u128`: `x_u16.into()` + | ^^^^^ expected `u128`, found `u16` + | +help: you can convert a `u16` to a `u128` + | +LL | x_u128 > x_u16.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:71:18 | LL | x_u128 > x_u32; - | ^^^^^ - | | - | expected `u128`, found `u32` - | help: you can convert a `u32` to a `u128`: `x_u32.into()` + | ^^^^^ expected `u128`, found `u32` + | +help: you can convert a `u32` to a `u128` + | +LL | x_u128 > x_u32.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:73:18 | LL | x_u128 > x_u64; - | ^^^^^ - | | - | expected `u128`, found `u64` - | help: you can convert a `u64` to a `u128`: `x_u64.into()` + | ^^^^^ expected `u128`, found `u64` + | +help: you can convert a `u64` to a `u128` + | +LL | x_u128 > x_u64.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:75:18 @@ -251,25 +271,29 @@ LL | x_u128 > x_usize; help: you can convert a `usize` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_usize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:78:19 | LL | x_usize > x_u8; - | ^^^^ - | | - | expected `usize`, found `u8` - | help: you can convert a `u8` to a `usize`: `x_u8.into()` + | ^^^^ expected `usize`, found `u8` + | +help: you can convert a `u8` to a `usize` + | +LL | x_usize > x_u8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:80:19 | LL | x_usize > x_u16; - | ^^^^^ - | | - | expected `usize`, found `u16` - | help: you can convert a `u16` to a `usize`: `x_u16.into()` + | ^^^^^ expected `usize`, found `u16` + | +help: you can convert a `u16` to a `usize` + | +LL | x_usize > x_u16.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:82:19 @@ -280,7 +304,7 @@ LL | x_usize > x_u32; help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_u32.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:84:19 @@ -291,7 +315,7 @@ LL | x_usize > x_u64; help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_u64.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:86:19 @@ -302,7 +326,7 @@ LL | x_usize > x_u128; help: you can convert a `u128` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_u128.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:92:16 @@ -313,7 +337,7 @@ LL | x_i8 > x_i16; help: you can convert `x_i8` from `i8` to `i16`, matching the type of `x_i16` | LL | i16::from(x_i8) > x_i16; - | ~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:94:16 @@ -324,7 +348,7 @@ LL | x_i8 > x_i32; help: you can convert `x_i8` from `i8` to `i32`, matching the type of `x_i32` | LL | i32::from(x_i8) > x_i32; - | ~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:96:16 @@ -335,7 +359,7 @@ LL | x_i8 > x_i64; help: you can convert `x_i8` from `i8` to `i64`, matching the type of `x_i64` | LL | i64::from(x_i8) > x_i64; - | ~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:98:16 @@ -346,7 +370,7 @@ LL | x_i8 > x_i128; help: you can convert `x_i8` from `i8` to `i128`, matching the type of `x_i128` | LL | i128::from(x_i8) > x_i128; - | ~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:100:16 @@ -357,16 +381,18 @@ LL | x_i8 > x_isize; help: you can convert `x_i8` from `i8` to `isize`, matching the type of `x_isize` | LL | isize::from(x_i8) > x_isize; - | ~~~~~~~~~~~~~~~~~ + | ++++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:103:17 | LL | x_i16 > x_i8; - | ^^^^ - | | - | expected `i16`, found `i8` - | help: you can convert an `i8` to an `i16`: `x_i8.into()` + | ^^^^ expected `i16`, found `i8` + | +help: you can convert an `i8` to an `i16` + | +LL | x_i16 > x_i8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:105:17 @@ -377,7 +403,7 @@ LL | x_i16 > x_i32; help: you can convert `x_i16` from `i16` to `i32`, matching the type of `x_i32` | LL | i32::from(x_i16) > x_i32; - | ~~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:107:17 @@ -388,7 +414,7 @@ LL | x_i16 > x_i64; help: you can convert `x_i16` from `i16` to `i64`, matching the type of `x_i64` | LL | i64::from(x_i16) > x_i64; - | ~~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:109:17 @@ -399,7 +425,7 @@ LL | x_i16 > x_i128; help: you can convert `x_i16` from `i16` to `i128`, matching the type of `x_i128` | LL | i128::from(x_i16) > x_i128; - | ~~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:111:17 @@ -410,25 +436,29 @@ LL | x_i16 > x_isize; help: you can convert `x_i16` from `i16` to `isize`, matching the type of `x_isize` | LL | isize::from(x_i16) > x_isize; - | ~~~~~~~~~~~~~~~~~~ + | ++++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:114:17 | LL | x_i32 > x_i8; - | ^^^^ - | | - | expected `i32`, found `i8` - | help: you can convert an `i8` to an `i32`: `x_i8.into()` + | ^^^^ expected `i32`, found `i8` + | +help: you can convert an `i8` to an `i32` + | +LL | x_i32 > x_i8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:116:17 | LL | x_i32 > x_i16; - | ^^^^^ - | | - | expected `i32`, found `i16` - | help: you can convert an `i16` to an `i32`: `x_i16.into()` + | ^^^^^ expected `i32`, found `i16` + | +help: you can convert an `i16` to an `i32` + | +LL | x_i32 > x_i16.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:118:17 @@ -439,7 +469,7 @@ LL | x_i32 > x_i64; help: you can convert `x_i32` from `i32` to `i64`, matching the type of `x_i64` | LL | i64::from(x_i32) > x_i64; - | ~~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:120:17 @@ -450,7 +480,7 @@ LL | x_i32 > x_i128; help: you can convert `x_i32` from `i32` to `i128`, matching the type of `x_i128` | LL | i128::from(x_i32) > x_i128; - | ~~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:122:17 @@ -461,34 +491,40 @@ LL | x_i32 > x_isize; help: you can convert an `isize` to an `i32` and panic if the converted value doesn't fit | LL | x_i32 > x_isize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:125:17 | LL | x_i64 > x_i8; - | ^^^^ - | | - | expected `i64`, found `i8` - | help: you can convert an `i8` to an `i64`: `x_i8.into()` + | ^^^^ expected `i64`, found `i8` + | +help: you can convert an `i8` to an `i64` + | +LL | x_i64 > x_i8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:127:17 | LL | x_i64 > x_i16; - | ^^^^^ - | | - | expected `i64`, found `i16` - | help: you can convert an `i16` to an `i64`: `x_i16.into()` + | ^^^^^ expected `i64`, found `i16` + | +help: you can convert an `i16` to an `i64` + | +LL | x_i64 > x_i16.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:129:17 | LL | x_i64 > x_i32; - | ^^^^^ - | | - | expected `i64`, found `i32` - | help: you can convert an `i32` to an `i64`: `x_i32.into()` + | ^^^^^ expected `i64`, found `i32` + | +help: you can convert an `i32` to an `i64` + | +LL | x_i64 > x_i32.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:131:17 @@ -499,7 +535,7 @@ LL | x_i64 > x_i128; help: you can convert `x_i64` from `i64` to `i128`, matching the type of `x_i128` | LL | i128::from(x_i64) > x_i128; - | ~~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:133:17 @@ -510,43 +546,51 @@ LL | x_i64 > x_isize; help: you can convert an `isize` to an `i64` and panic if the converted value doesn't fit | LL | x_i64 > x_isize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:136:18 | LL | x_i128 > x_i8; - | ^^^^ - | | - | expected `i128`, found `i8` - | help: you can convert an `i8` to an `i128`: `x_i8.into()` + | ^^^^ expected `i128`, found `i8` + | +help: you can convert an `i8` to an `i128` + | +LL | x_i128 > x_i8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:138:18 | LL | x_i128 > x_i16; - | ^^^^^ - | | - | expected `i128`, found `i16` - | help: you can convert an `i16` to an `i128`: `x_i16.into()` + | ^^^^^ expected `i128`, found `i16` + | +help: you can convert an `i16` to an `i128` + | +LL | x_i128 > x_i16.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:140:18 | LL | x_i128 > x_i32; - | ^^^^^ - | | - | expected `i128`, found `i32` - | help: you can convert an `i32` to an `i128`: `x_i32.into()` + | ^^^^^ expected `i128`, found `i32` + | +help: you can convert an `i32` to an `i128` + | +LL | x_i128 > x_i32.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:142:18 | LL | x_i128 > x_i64; - | ^^^^^ - | | - | expected `i128`, found `i64` - | help: you can convert an `i64` to an `i128`: `x_i64.into()` + | ^^^^^ expected `i128`, found `i64` + | +help: you can convert an `i64` to an `i128` + | +LL | x_i128 > x_i64.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:144:18 @@ -557,25 +601,29 @@ LL | x_i128 > x_isize; help: you can convert an `isize` to an `i128` and panic if the converted value doesn't fit | LL | x_i128 > x_isize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:147:19 | LL | x_isize > x_i8; - | ^^^^ - | | - | expected `isize`, found `i8` - | help: you can convert an `i8` to an `isize`: `x_i8.into()` + | ^^^^ expected `isize`, found `i8` + | +help: you can convert an `i8` to an `isize` + | +LL | x_isize > x_i8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:149:19 | LL | x_isize > x_i16; - | ^^^^^ - | | - | expected `isize`, found `i16` - | help: you can convert an `i16` to an `isize`: `x_i16.into()` + | ^^^^^ expected `isize`, found `i16` + | +help: you can convert an `i16` to an `isize` + | +LL | x_isize > x_i16.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:151:19 @@ -586,7 +634,7 @@ LL | x_isize > x_i32; help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_i32.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:153:19 @@ -597,7 +645,7 @@ LL | x_isize > x_i64; help: you can convert an `i64` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_i64.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:155:19 @@ -608,7 +656,7 @@ LL | x_isize > x_i128; help: you can convert an `i128` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_i128.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:161:16 @@ -619,7 +667,7 @@ LL | x_u8 > x_i8; help: you can convert an `i8` to a `u8` and panic if the converted value doesn't fit | LL | x_u8 > x_i8.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:163:16 @@ -630,7 +678,7 @@ LL | x_u8 > x_i16; help: you can convert `x_u8` from `u8` to `i16`, matching the type of `x_i16` | LL | i16::from(x_u8) > x_i16; - | ~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:165:16 @@ -641,7 +689,7 @@ LL | x_u8 > x_i32; help: you can convert `x_u8` from `u8` to `i32`, matching the type of `x_i32` | LL | i32::from(x_u8) > x_i32; - | ~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:167:16 @@ -652,7 +700,7 @@ LL | x_u8 > x_i64; help: you can convert `x_u8` from `u8` to `i64`, matching the type of `x_i64` | LL | i64::from(x_u8) > x_i64; - | ~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:169:16 @@ -663,7 +711,7 @@ LL | x_u8 > x_i128; help: you can convert `x_u8` from `u8` to `i128`, matching the type of `x_i128` | LL | i128::from(x_u8) > x_i128; - | ~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:171:16 @@ -674,7 +722,7 @@ LL | x_u8 > x_isize; help: you can convert `x_u8` from `u8` to `isize`, matching the type of `x_isize` | LL | isize::from(x_u8) > x_isize; - | ~~~~~~~~~~~~~~~~~ + | ++++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:174:17 @@ -685,7 +733,7 @@ LL | x_u16 > x_i8; help: you can convert an `i8` to a `u16` and panic if the converted value doesn't fit | LL | x_u16 > x_i8.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:176:17 @@ -696,7 +744,7 @@ LL | x_u16 > x_i16; help: you can convert an `i16` to a `u16` and panic if the converted value doesn't fit | LL | x_u16 > x_i16.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:178:17 @@ -707,7 +755,7 @@ LL | x_u16 > x_i32; help: you can convert `x_u16` from `u16` to `i32`, matching the type of `x_i32` | LL | i32::from(x_u16) > x_i32; - | ~~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:180:17 @@ -718,7 +766,7 @@ LL | x_u16 > x_i64; help: you can convert `x_u16` from `u16` to `i64`, matching the type of `x_i64` | LL | i64::from(x_u16) > x_i64; - | ~~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:182:17 @@ -729,7 +777,7 @@ LL | x_u16 > x_i128; help: you can convert `x_u16` from `u16` to `i128`, matching the type of `x_i128` | LL | i128::from(x_u16) > x_i128; - | ~~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:184:17 @@ -740,7 +788,7 @@ LL | x_u16 > x_isize; help: you can convert an `isize` to a `u16` and panic if the converted value doesn't fit | LL | x_u16 > x_isize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:187:17 @@ -751,7 +799,7 @@ LL | x_u32 > x_i8; help: you can convert an `i8` to a `u32` and panic if the converted value doesn't fit | LL | x_u32 > x_i8.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:189:17 @@ -762,7 +810,7 @@ LL | x_u32 > x_i16; help: you can convert an `i16` to a `u32` and panic if the converted value doesn't fit | LL | x_u32 > x_i16.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:191:17 @@ -773,7 +821,7 @@ LL | x_u32 > x_i32; help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit | LL | x_u32 > x_i32.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:193:17 @@ -784,7 +832,7 @@ LL | x_u32 > x_i64; help: you can convert `x_u32` from `u32` to `i64`, matching the type of `x_i64` | LL | i64::from(x_u32) > x_i64; - | ~~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:195:17 @@ -795,7 +843,7 @@ LL | x_u32 > x_i128; help: you can convert `x_u32` from `u32` to `i128`, matching the type of `x_i128` | LL | i128::from(x_u32) > x_i128; - | ~~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:197:17 @@ -806,7 +854,7 @@ LL | x_u32 > x_isize; help: you can convert an `isize` to a `u32` and panic if the converted value doesn't fit | LL | x_u32 > x_isize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:200:17 @@ -817,7 +865,7 @@ LL | x_u64 > x_i8; help: you can convert an `i8` to a `u64` and panic if the converted value doesn't fit | LL | x_u64 > x_i8.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:202:17 @@ -828,7 +876,7 @@ LL | x_u64 > x_i16; help: you can convert an `i16` to a `u64` and panic if the converted value doesn't fit | LL | x_u64 > x_i16.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:204:17 @@ -839,7 +887,7 @@ LL | x_u64 > x_i32; help: you can convert an `i32` to a `u64` and panic if the converted value doesn't fit | LL | x_u64 > x_i32.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:206:17 @@ -850,7 +898,7 @@ LL | x_u64 > x_i64; help: you can convert an `i64` to a `u64` and panic if the converted value doesn't fit | LL | x_u64 > x_i64.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:208:17 @@ -861,7 +909,7 @@ LL | x_u64 > x_i128; help: you can convert `x_u64` from `u64` to `i128`, matching the type of `x_i128` | LL | i128::from(x_u64) > x_i128; - | ~~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:210:17 @@ -872,7 +920,7 @@ LL | x_u64 > x_isize; help: you can convert an `isize` to a `u64` and panic if the converted value doesn't fit | LL | x_u64 > x_isize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:213:18 @@ -883,7 +931,7 @@ LL | x_u128 > x_i8; help: you can convert an `i8` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_i8.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:215:18 @@ -894,7 +942,7 @@ LL | x_u128 > x_i16; help: you can convert an `i16` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_i16.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:217:18 @@ -905,7 +953,7 @@ LL | x_u128 > x_i32; help: you can convert an `i32` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_i32.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:219:18 @@ -916,7 +964,7 @@ LL | x_u128 > x_i64; help: you can convert an `i64` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_i64.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:221:18 @@ -927,7 +975,7 @@ LL | x_u128 > x_i128; help: you can convert an `i128` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_i128.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:223:18 @@ -938,7 +986,7 @@ LL | x_u128 > x_isize; help: you can convert an `isize` to a `u128` and panic if the converted value doesn't fit | LL | x_u128 > x_isize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:226:19 @@ -949,7 +997,7 @@ LL | x_usize > x_i8; help: you can convert an `i8` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_i8.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:228:19 @@ -960,7 +1008,7 @@ LL | x_usize > x_i16; help: you can convert an `i16` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_i16.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:230:19 @@ -971,7 +1019,7 @@ LL | x_usize > x_i32; help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_i32.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:232:19 @@ -982,7 +1030,7 @@ LL | x_usize > x_i64; help: you can convert an `i64` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_i64.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:234:19 @@ -993,7 +1041,7 @@ LL | x_usize > x_i128; help: you can convert an `i128` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_i128.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:236:19 @@ -1004,7 +1052,7 @@ LL | x_usize > x_isize; help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit | LL | x_usize > x_isize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:242:16 @@ -1015,7 +1063,7 @@ LL | x_i8 > x_u8; help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit | LL | x_i8 > x_u8.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:244:16 @@ -1026,7 +1074,7 @@ LL | x_i8 > x_u16; help: you can convert a `u16` to an `i8` and panic if the converted value doesn't fit | LL | x_i8 > x_u16.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:246:16 @@ -1037,7 +1085,7 @@ LL | x_i8 > x_u32; help: you can convert a `u32` to an `i8` and panic if the converted value doesn't fit | LL | x_i8 > x_u32.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:248:16 @@ -1048,7 +1096,7 @@ LL | x_i8 > x_u64; help: you can convert a `u64` to an `i8` and panic if the converted value doesn't fit | LL | x_i8 > x_u64.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:250:16 @@ -1059,7 +1107,7 @@ LL | x_i8 > x_u128; help: you can convert a `u128` to an `i8` and panic if the converted value doesn't fit | LL | x_i8 > x_u128.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:252:16 @@ -1070,16 +1118,18 @@ LL | x_i8 > x_usize; help: you can convert a `usize` to an `i8` and panic if the converted value doesn't fit | LL | x_i8 > x_usize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:255:17 | LL | x_i16 > x_u8; - | ^^^^ - | | - | expected `i16`, found `u8` - | help: you can convert a `u8` to an `i16`: `x_u8.into()` + | ^^^^ expected `i16`, found `u8` + | +help: you can convert a `u8` to an `i16` + | +LL | x_i16 > x_u8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:257:17 @@ -1090,7 +1140,7 @@ LL | x_i16 > x_u16; help: you can convert a `u16` to an `i16` and panic if the converted value doesn't fit | LL | x_i16 > x_u16.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:259:17 @@ -1101,7 +1151,7 @@ LL | x_i16 > x_u32; help: you can convert a `u32` to an `i16` and panic if the converted value doesn't fit | LL | x_i16 > x_u32.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:261:17 @@ -1112,7 +1162,7 @@ LL | x_i16 > x_u64; help: you can convert a `u64` to an `i16` and panic if the converted value doesn't fit | LL | x_i16 > x_u64.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:263:17 @@ -1123,7 +1173,7 @@ LL | x_i16 > x_u128; help: you can convert a `u128` to an `i16` and panic if the converted value doesn't fit | LL | x_i16 > x_u128.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:265:17 @@ -1134,25 +1184,29 @@ LL | x_i16 > x_usize; help: you can convert a `usize` to an `i16` and panic if the converted value doesn't fit | LL | x_i16 > x_usize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:268:17 | LL | x_i32 > x_u8; - | ^^^^ - | | - | expected `i32`, found `u8` - | help: you can convert a `u8` to an `i32`: `x_u8.into()` + | ^^^^ expected `i32`, found `u8` + | +help: you can convert a `u8` to an `i32` + | +LL | x_i32 > x_u8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:270:17 | LL | x_i32 > x_u16; - | ^^^^^ - | | - | expected `i32`, found `u16` - | help: you can convert a `u16` to an `i32`: `x_u16.into()` + | ^^^^^ expected `i32`, found `u16` + | +help: you can convert a `u16` to an `i32` + | +LL | x_i32 > x_u16.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:272:17 @@ -1163,7 +1217,7 @@ LL | x_i32 > x_u32; help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit | LL | x_i32 > x_u32.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:274:17 @@ -1174,7 +1228,7 @@ LL | x_i32 > x_u64; help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit | LL | x_i32 > x_u64.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:276:17 @@ -1185,7 +1239,7 @@ LL | x_i32 > x_u128; help: you can convert a `u128` to an `i32` and panic if the converted value doesn't fit | LL | x_i32 > x_u128.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:278:17 @@ -1196,34 +1250,40 @@ LL | x_i32 > x_usize; help: you can convert a `usize` to an `i32` and panic if the converted value doesn't fit | LL | x_i32 > x_usize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:281:17 | LL | x_i64 > x_u8; - | ^^^^ - | | - | expected `i64`, found `u8` - | help: you can convert a `u8` to an `i64`: `x_u8.into()` + | ^^^^ expected `i64`, found `u8` + | +help: you can convert a `u8` to an `i64` + | +LL | x_i64 > x_u8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:283:17 | LL | x_i64 > x_u16; - | ^^^^^ - | | - | expected `i64`, found `u16` - | help: you can convert a `u16` to an `i64`: `x_u16.into()` + | ^^^^^ expected `i64`, found `u16` + | +help: you can convert a `u16` to an `i64` + | +LL | x_i64 > x_u16.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:285:17 | LL | x_i64 > x_u32; - | ^^^^^ - | | - | expected `i64`, found `u32` - | help: you can convert a `u32` to an `i64`: `x_u32.into()` + | ^^^^^ expected `i64`, found `u32` + | +help: you can convert a `u32` to an `i64` + | +LL | x_i64 > x_u32.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:287:17 @@ -1234,7 +1294,7 @@ LL | x_i64 > x_u64; help: you can convert a `u64` to an `i64` and panic if the converted value doesn't fit | LL | x_i64 > x_u64.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:289:17 @@ -1245,7 +1305,7 @@ LL | x_i64 > x_u128; help: you can convert a `u128` to an `i64` and panic if the converted value doesn't fit | LL | x_i64 > x_u128.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:291:17 @@ -1256,43 +1316,51 @@ LL | x_i64 > x_usize; help: you can convert a `usize` to an `i64` and panic if the converted value doesn't fit | LL | x_i64 > x_usize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:294:18 | LL | x_i128 > x_u8; - | ^^^^ - | | - | expected `i128`, found `u8` - | help: you can convert a `u8` to an `i128`: `x_u8.into()` + | ^^^^ expected `i128`, found `u8` + | +help: you can convert a `u8` to an `i128` + | +LL | x_i128 > x_u8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:296:18 | LL | x_i128 > x_u16; - | ^^^^^ - | | - | expected `i128`, found `u16` - | help: you can convert a `u16` to an `i128`: `x_u16.into()` + | ^^^^^ expected `i128`, found `u16` + | +help: you can convert a `u16` to an `i128` + | +LL | x_i128 > x_u16.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:298:18 | LL | x_i128 > x_u32; - | ^^^^^ - | | - | expected `i128`, found `u32` - | help: you can convert a `u32` to an `i128`: `x_u32.into()` + | ^^^^^ expected `i128`, found `u32` + | +help: you can convert a `u32` to an `i128` + | +LL | x_i128 > x_u32.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:300:18 | LL | x_i128 > x_u64; - | ^^^^^ - | | - | expected `i128`, found `u64` - | help: you can convert a `u64` to an `i128`: `x_u64.into()` + | ^^^^^ expected `i128`, found `u64` + | +help: you can convert a `u64` to an `i128` + | +LL | x_i128 > x_u64.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:302:18 @@ -1303,7 +1371,7 @@ LL | x_i128 > x_u128; help: you can convert a `u128` to an `i128` and panic if the converted value doesn't fit | LL | x_i128 > x_u128.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:304:18 @@ -1314,16 +1382,18 @@ LL | x_i128 > x_usize; help: you can convert a `usize` to an `i128` and panic if the converted value doesn't fit | LL | x_i128 > x_usize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:307:19 | LL | x_isize > x_u8; - | ^^^^ - | | - | expected `isize`, found `u8` - | help: you can convert a `u8` to an `isize`: `x_u8.into()` + | ^^^^ expected `isize`, found `u8` + | +help: you can convert a `u8` to an `isize` + | +LL | x_isize > x_u8.into(); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:309:19 @@ -1334,7 +1404,7 @@ LL | x_isize > x_u16; help: you can convert a `u16` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_u16.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:311:19 @@ -1345,7 +1415,7 @@ LL | x_isize > x_u32; help: you can convert a `u32` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_u32.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:313:19 @@ -1356,7 +1426,7 @@ LL | x_isize > x_u64; help: you can convert a `u64` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_u64.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:315:19 @@ -1367,7 +1437,7 @@ LL | x_isize > x_u128; help: you can convert a `u128` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_u128.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast-binop.rs:317:19 @@ -1378,7 +1448,7 @@ LL | x_isize > x_usize; help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit | LL | x_isize > x_usize.try_into().unwrap(); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error: aborting due to 132 previous errors diff --git a/src/test/ui/numeric/numeric-cast-no-fix.stderr b/src/test/ui/numeric/numeric-cast-no-fix.stderr index 4510ce10b3d..e4843206de1 100644 --- a/src/test/ui/numeric/numeric-cast-no-fix.stderr +++ b/src/test/ui/numeric/numeric-cast-no-fix.stderr @@ -47,7 +47,7 @@ LL | x_u8 > -1_isize; help: you can convert `x_u8` from `u8` to `isize`, matching the type of `-1_isize` | LL | isize::from(x_u8) > -1_isize; - | ~~~~~~~~~~~~~~~~~ + | ++++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:23:15 @@ -74,7 +74,7 @@ LL | x_u64 > -1_i128; help: you can convert `x_u64` from `u64` to `i128`, matching the type of `-1_i128` | LL | i128::from(x_u64) > -1_i128; - | ~~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:29:13 @@ -85,7 +85,7 @@ LL | x_u32 > -1_i128; help: you can convert `x_u32` from `u32` to `i128`, matching the type of `-1_i128` | LL | i128::from(x_u32) > -1_i128; - | ~~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:31:13 @@ -96,7 +96,7 @@ LL | x_u16 > -1_i128; help: you can convert `x_u16` from `u16` to `i128`, matching the type of `-1_i128` | LL | i128::from(x_u16) > -1_i128; - | ~~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:33:12 @@ -107,7 +107,7 @@ LL | x_u8 > -1_i128; help: you can convert `x_u8` from `u8` to `i128`, matching the type of `-1_i128` | LL | i128::from(x_u8) > -1_i128; - | ~~~~~~~~~~~~~~~~ + | +++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:36:15 @@ -142,7 +142,7 @@ LL | x_u32 > -1_i64; help: you can convert `x_u32` from `u32` to `i64`, matching the type of `-1_i64` | LL | i64::from(x_u32) > -1_i64; - | ~~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:44:13 @@ -153,7 +153,7 @@ LL | x_u16 > -1_i64; help: you can convert `x_u16` from `u16` to `i64`, matching the type of `-1_i64` | LL | i64::from(x_u16) > -1_i64; - | ~~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:46:12 @@ -164,7 +164,7 @@ LL | x_u8 > -1_i64; help: you can convert `x_u8` from `u8` to `i64`, matching the type of `-1_i64` | LL | i64::from(x_u8) > -1_i64; - | ~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:49:15 @@ -207,7 +207,7 @@ LL | x_u16 > -1_i32; help: you can convert `x_u16` from `u16` to `i32`, matching the type of `-1_i32` | LL | i32::from(x_u16) > -1_i32; - | ~~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:59:12 @@ -218,7 +218,7 @@ LL | x_u8 > -1_i32; help: you can convert `x_u8` from `u8` to `i32`, matching the type of `-1_i32` | LL | i32::from(x_u8) > -1_i32; - | ~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:62:15 @@ -269,7 +269,7 @@ LL | x_u8 > -1_i16; help: you can convert `x_u8` from `u8` to `i16`, matching the type of `-1_i16` | LL | i16::from(x_u8) > -1_i16; - | ~~~~~~~~~~~~~~~ + | ++++++++++ + error[E0308]: mismatched types --> $DIR/numeric-cast-no-fix.rs:75:15 diff --git a/src/test/ui/numeric/numeric-cast.stderr b/src/test/ui/numeric/numeric-cast.stderr index 8bc617be573..3e2bc5bc82d 100644 --- a/src/test/ui/numeric/numeric-cast.stderr +++ b/src/test/ui/numeric/numeric-cast.stderr @@ -7,7 +7,7 @@ LL | foo::<usize>(x_u64); help: you can convert a `u64` to a `usize` and panic if the converted value doesn't fit | LL | foo::<usize>(x_u64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:25:18 @@ -18,25 +18,29 @@ LL | foo::<usize>(x_u32); help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit | LL | foo::<usize>(x_u32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:27:18 | LL | foo::<usize>(x_u16); - | ^^^^^ - | | - | expected `usize`, found `u16` - | help: you can convert a `u16` to a `usize`: `x_u16.into()` + | ^^^^^ expected `usize`, found `u16` + | +help: you can convert a `u16` to a `usize` + | +LL | foo::<usize>(x_u16.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:29:18 | LL | foo::<usize>(x_u8); - | ^^^^ - | | - | expected `usize`, found `u8` - | help: you can convert a `u8` to a `usize`: `x_u8.into()` + | ^^^^ expected `usize`, found `u8` + | +help: you can convert a `u8` to a `usize` + | +LL | foo::<usize>(x_u8.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:31:18 @@ -47,7 +51,7 @@ LL | foo::<usize>(x_isize); help: you can convert an `isize` to a `usize` and panic if the converted value doesn't fit | LL | foo::<usize>(x_isize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:33:18 @@ -58,7 +62,7 @@ LL | foo::<usize>(x_i64); help: you can convert an `i64` to a `usize` and panic if the converted value doesn't fit | LL | foo::<usize>(x_i64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:35:18 @@ -69,7 +73,7 @@ LL | foo::<usize>(x_i32); help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit | LL | foo::<usize>(x_i32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:37:18 @@ -80,7 +84,7 @@ LL | foo::<usize>(x_i16); help: you can convert an `i16` to a `usize` and panic if the converted value doesn't fit | LL | foo::<usize>(x_i16.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:39:18 @@ -91,7 +95,7 @@ LL | foo::<usize>(x_i8); help: you can convert an `i8` to a `usize` and panic if the converted value doesn't fit | LL | foo::<usize>(x_i8.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:44:18 @@ -102,7 +106,7 @@ LL | foo::<isize>(x_usize); help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit | LL | foo::<isize>(x_usize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:46:18 @@ -113,7 +117,7 @@ LL | foo::<isize>(x_u64); help: you can convert a `u64` to an `isize` and panic if the converted value doesn't fit | LL | foo::<isize>(x_u64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:48:18 @@ -124,7 +128,7 @@ LL | foo::<isize>(x_u32); help: you can convert a `u32` to an `isize` and panic if the converted value doesn't fit | LL | foo::<isize>(x_u32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:50:18 @@ -135,16 +139,18 @@ LL | foo::<isize>(x_u16); help: you can convert a `u16` to an `isize` and panic if the converted value doesn't fit | LL | foo::<isize>(x_u16.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:52:18 | LL | foo::<isize>(x_u8); - | ^^^^ - | | - | expected `isize`, found `u8` - | help: you can convert a `u8` to an `isize`: `x_u8.into()` + | ^^^^ expected `isize`, found `u8` + | +help: you can convert a `u8` to an `isize` + | +LL | foo::<isize>(x_u8.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:55:18 @@ -155,7 +161,7 @@ LL | foo::<isize>(x_i64); help: you can convert an `i64` to an `isize` and panic if the converted value doesn't fit | LL | foo::<isize>(x_i64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:57:18 @@ -166,25 +172,29 @@ LL | foo::<isize>(x_i32); help: you can convert an `i32` to an `isize` and panic if the converted value doesn't fit | LL | foo::<isize>(x_i32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:59:18 | LL | foo::<isize>(x_i16); - | ^^^^^ - | | - | expected `isize`, found `i16` - | help: you can convert an `i16` to an `isize`: `x_i16.into()` + | ^^^^^ expected `isize`, found `i16` + | +help: you can convert an `i16` to an `isize` + | +LL | foo::<isize>(x_i16.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:61:18 | LL | foo::<isize>(x_i8); - | ^^^^ - | | - | expected `isize`, found `i8` - | help: you can convert an `i8` to an `isize`: `x_i8.into()` + | ^^^^ expected `isize`, found `i8` + | +help: you can convert an `i8` to an `isize` + | +LL | foo::<isize>(x_i8.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:66:16 @@ -195,34 +205,40 @@ LL | foo::<u64>(x_usize); help: you can convert a `usize` to a `u64` and panic if the converted value doesn't fit | LL | foo::<u64>(x_usize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:69:16 | LL | foo::<u64>(x_u32); - | ^^^^^ - | | - | expected `u64`, found `u32` - | help: you can convert a `u32` to a `u64`: `x_u32.into()` + | ^^^^^ expected `u64`, found `u32` + | +help: you can convert a `u32` to a `u64` + | +LL | foo::<u64>(x_u32.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:71:16 | LL | foo::<u64>(x_u16); - | ^^^^^ - | | - | expected `u64`, found `u16` - | help: you can convert a `u16` to a `u64`: `x_u16.into()` + | ^^^^^ expected `u64`, found `u16` + | +help: you can convert a `u16` to a `u64` + | +LL | foo::<u64>(x_u16.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:73:16 | LL | foo::<u64>(x_u8); - | ^^^^ - | | - | expected `u64`, found `u8` - | help: you can convert a `u8` to a `u64`: `x_u8.into()` + | ^^^^ expected `u64`, found `u8` + | +help: you can convert a `u8` to a `u64` + | +LL | foo::<u64>(x_u8.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:75:16 @@ -233,7 +249,7 @@ LL | foo::<u64>(x_isize); help: you can convert an `isize` to a `u64` and panic if the converted value doesn't fit | LL | foo::<u64>(x_isize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:77:16 @@ -244,7 +260,7 @@ LL | foo::<u64>(x_i64); help: you can convert an `i64` to a `u64` and panic if the converted value doesn't fit | LL | foo::<u64>(x_i64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:79:16 @@ -255,7 +271,7 @@ LL | foo::<u64>(x_i32); help: you can convert an `i32` to a `u64` and panic if the converted value doesn't fit | LL | foo::<u64>(x_i32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:81:16 @@ -266,7 +282,7 @@ LL | foo::<u64>(x_i16); help: you can convert an `i16` to a `u64` and panic if the converted value doesn't fit | LL | foo::<u64>(x_i16.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:83:16 @@ -277,7 +293,7 @@ LL | foo::<u64>(x_i8); help: you can convert an `i8` to a `u64` and panic if the converted value doesn't fit | LL | foo::<u64>(x_i8.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:88:16 @@ -288,7 +304,7 @@ LL | foo::<i64>(x_usize); help: you can convert a `usize` to an `i64` and panic if the converted value doesn't fit | LL | foo::<i64>(x_usize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:90:16 @@ -299,34 +315,40 @@ LL | foo::<i64>(x_u64); help: you can convert a `u64` to an `i64` and panic if the converted value doesn't fit | LL | foo::<i64>(x_u64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:92:16 | LL | foo::<i64>(x_u32); - | ^^^^^ - | | - | expected `i64`, found `u32` - | help: you can convert a `u32` to an `i64`: `x_u32.into()` + | ^^^^^ expected `i64`, found `u32` + | +help: you can convert a `u32` to an `i64` + | +LL | foo::<i64>(x_u32.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:94:16 | LL | foo::<i64>(x_u16); - | ^^^^^ - | | - | expected `i64`, found `u16` - | help: you can convert a `u16` to an `i64`: `x_u16.into()` + | ^^^^^ expected `i64`, found `u16` + | +help: you can convert a `u16` to an `i64` + | +LL | foo::<i64>(x_u16.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:96:16 | LL | foo::<i64>(x_u8); - | ^^^^ - | | - | expected `i64`, found `u8` - | help: you can convert a `u8` to an `i64`: `x_u8.into()` + | ^^^^ expected `i64`, found `u8` + | +help: you can convert a `u8` to an `i64` + | +LL | foo::<i64>(x_u8.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:98:16 @@ -337,34 +359,40 @@ LL | foo::<i64>(x_isize); help: you can convert an `isize` to an `i64` and panic if the converted value doesn't fit | LL | foo::<i64>(x_isize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:101:16 | LL | foo::<i64>(x_i32); - | ^^^^^ - | | - | expected `i64`, found `i32` - | help: you can convert an `i32` to an `i64`: `x_i32.into()` + | ^^^^^ expected `i64`, found `i32` + | +help: you can convert an `i32` to an `i64` + | +LL | foo::<i64>(x_i32.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:103:16 | LL | foo::<i64>(x_i16); - | ^^^^^ - | | - | expected `i64`, found `i16` - | help: you can convert an `i16` to an `i64`: `x_i16.into()` + | ^^^^^ expected `i64`, found `i16` + | +help: you can convert an `i16` to an `i64` + | +LL | foo::<i64>(x_i16.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:105:16 | LL | foo::<i64>(x_i8); - | ^^^^ - | | - | expected `i64`, found `i8` - | help: you can convert an `i8` to an `i64`: `x_i8.into()` + | ^^^^ expected `i64`, found `i8` + | +help: you can convert an `i8` to an `i64` + | +LL | foo::<i64>(x_i8.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:110:16 @@ -375,7 +403,7 @@ LL | foo::<u32>(x_usize); help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit | LL | foo::<u32>(x_usize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:112:16 @@ -386,25 +414,29 @@ LL | foo::<u32>(x_u64); help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit | LL | foo::<u32>(x_u64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:115:16 | LL | foo::<u32>(x_u16); - | ^^^^^ - | | - | expected `u32`, found `u16` - | help: you can convert a `u16` to a `u32`: `x_u16.into()` + | ^^^^^ expected `u32`, found `u16` + | +help: you can convert a `u16` to a `u32` + | +LL | foo::<u32>(x_u16.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:117:16 | LL | foo::<u32>(x_u8); - | ^^^^ - | | - | expected `u32`, found `u8` - | help: you can convert a `u8` to a `u32`: `x_u8.into()` + | ^^^^ expected `u32`, found `u8` + | +help: you can convert a `u8` to a `u32` + | +LL | foo::<u32>(x_u8.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:119:16 @@ -415,7 +447,7 @@ LL | foo::<u32>(x_isize); help: you can convert an `isize` to a `u32` and panic if the converted value doesn't fit | LL | foo::<u32>(x_isize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:121:16 @@ -426,7 +458,7 @@ LL | foo::<u32>(x_i64); help: you can convert an `i64` to a `u32` and panic if the converted value doesn't fit | LL | foo::<u32>(x_i64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:123:16 @@ -437,7 +469,7 @@ LL | foo::<u32>(x_i32); help: you can convert an `i32` to a `u32` and panic if the converted value doesn't fit | LL | foo::<u32>(x_i32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:125:16 @@ -448,7 +480,7 @@ LL | foo::<u32>(x_i16); help: you can convert an `i16` to a `u32` and panic if the converted value doesn't fit | LL | foo::<u32>(x_i16.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:127:16 @@ -459,7 +491,7 @@ LL | foo::<u32>(x_i8); help: you can convert an `i8` to a `u32` and panic if the converted value doesn't fit | LL | foo::<u32>(x_i8.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:132:16 @@ -470,7 +502,7 @@ LL | foo::<i32>(x_usize); help: you can convert a `usize` to an `i32` and panic if the converted value doesn't fit | LL | foo::<i32>(x_usize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:134:16 @@ -481,7 +513,7 @@ LL | foo::<i32>(x_u64); help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit | LL | foo::<i32>(x_u64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:136:16 @@ -492,25 +524,29 @@ LL | foo::<i32>(x_u32); help: you can convert a `u32` to an `i32` and panic if the converted value doesn't fit | LL | foo::<i32>(x_u32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:138:16 | LL | foo::<i32>(x_u16); - | ^^^^^ - | | - | expected `i32`, found `u16` - | help: you can convert a `u16` to an `i32`: `x_u16.into()` + | ^^^^^ expected `i32`, found `u16` + | +help: you can convert a `u16` to an `i32` + | +LL | foo::<i32>(x_u16.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:140:16 | LL | foo::<i32>(x_u8); - | ^^^^ - | | - | expected `i32`, found `u8` - | help: you can convert a `u8` to an `i32`: `x_u8.into()` + | ^^^^ expected `i32`, found `u8` + | +help: you can convert a `u8` to an `i32` + | +LL | foo::<i32>(x_u8.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:142:16 @@ -521,7 +557,7 @@ LL | foo::<i32>(x_isize); help: you can convert an `isize` to an `i32` and panic if the converted value doesn't fit | LL | foo::<i32>(x_isize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:144:16 @@ -532,25 +568,29 @@ LL | foo::<i32>(x_i64); help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit | LL | foo::<i32>(x_i64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:147:16 | LL | foo::<i32>(x_i16); - | ^^^^^ - | | - | expected `i32`, found `i16` - | help: you can convert an `i16` to an `i32`: `x_i16.into()` + | ^^^^^ expected `i32`, found `i16` + | +help: you can convert an `i16` to an `i32` + | +LL | foo::<i32>(x_i16.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:149:16 | LL | foo::<i32>(x_i8); - | ^^^^ - | | - | expected `i32`, found `i8` - | help: you can convert an `i8` to an `i32`: `x_i8.into()` + | ^^^^ expected `i32`, found `i8` + | +help: you can convert an `i8` to an `i32` + | +LL | foo::<i32>(x_i8.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:154:16 @@ -561,7 +601,7 @@ LL | foo::<u16>(x_usize); help: you can convert a `usize` to a `u16` and panic if the converted value doesn't fit | LL | foo::<u16>(x_usize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:156:16 @@ -572,7 +612,7 @@ LL | foo::<u16>(x_u64); help: you can convert a `u64` to a `u16` and panic if the converted value doesn't fit | LL | foo::<u16>(x_u64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:158:16 @@ -583,16 +623,18 @@ LL | foo::<u16>(x_u32); help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit | LL | foo::<u16>(x_u32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:161:16 | LL | foo::<u16>(x_u8); - | ^^^^ - | | - | expected `u16`, found `u8` - | help: you can convert a `u8` to a `u16`: `x_u8.into()` + | ^^^^ expected `u16`, found `u8` + | +help: you can convert a `u8` to a `u16` + | +LL | foo::<u16>(x_u8.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:163:16 @@ -603,7 +645,7 @@ LL | foo::<u16>(x_isize); help: you can convert an `isize` to a `u16` and panic if the converted value doesn't fit | LL | foo::<u16>(x_isize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:165:16 @@ -614,7 +656,7 @@ LL | foo::<u16>(x_i64); help: you can convert an `i64` to a `u16` and panic if the converted value doesn't fit | LL | foo::<u16>(x_i64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:167:16 @@ -625,7 +667,7 @@ LL | foo::<u16>(x_i32); help: you can convert an `i32` to a `u16` and panic if the converted value doesn't fit | LL | foo::<u16>(x_i32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:169:16 @@ -636,7 +678,7 @@ LL | foo::<u16>(x_i16); help: you can convert an `i16` to a `u16` and panic if the converted value doesn't fit | LL | foo::<u16>(x_i16.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:171:16 @@ -647,7 +689,7 @@ LL | foo::<u16>(x_i8); help: you can convert an `i8` to a `u16` and panic if the converted value doesn't fit | LL | foo::<u16>(x_i8.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:176:16 @@ -658,7 +700,7 @@ LL | foo::<i16>(x_usize); help: you can convert a `usize` to an `i16` and panic if the converted value doesn't fit | LL | foo::<i16>(x_usize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:178:16 @@ -669,7 +711,7 @@ LL | foo::<i16>(x_u64); help: you can convert a `u64` to an `i16` and panic if the converted value doesn't fit | LL | foo::<i16>(x_u64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:180:16 @@ -680,7 +722,7 @@ LL | foo::<i16>(x_u32); help: you can convert a `u32` to an `i16` and panic if the converted value doesn't fit | LL | foo::<i16>(x_u32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:182:16 @@ -691,16 +733,18 @@ LL | foo::<i16>(x_u16); help: you can convert a `u16` to an `i16` and panic if the converted value doesn't fit | LL | foo::<i16>(x_u16.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:184:16 | LL | foo::<i16>(x_u8); - | ^^^^ - | | - | expected `i16`, found `u8` - | help: you can convert a `u8` to an `i16`: `x_u8.into()` + | ^^^^ expected `i16`, found `u8` + | +help: you can convert a `u8` to an `i16` + | +LL | foo::<i16>(x_u8.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:186:16 @@ -711,7 +755,7 @@ LL | foo::<i16>(x_isize); help: you can convert an `isize` to an `i16` and panic if the converted value doesn't fit | LL | foo::<i16>(x_isize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:188:16 @@ -722,7 +766,7 @@ LL | foo::<i16>(x_i64); help: you can convert an `i64` to an `i16` and panic if the converted value doesn't fit | LL | foo::<i16>(x_i64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:190:16 @@ -733,16 +777,18 @@ LL | foo::<i16>(x_i32); help: you can convert an `i32` to an `i16` and panic if the converted value doesn't fit | LL | foo::<i16>(x_i32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:193:16 | LL | foo::<i16>(x_i8); - | ^^^^ - | | - | expected `i16`, found `i8` - | help: you can convert an `i8` to an `i16`: `x_i8.into()` + | ^^^^ expected `i16`, found `i8` + | +help: you can convert an `i8` to an `i16` + | +LL | foo::<i16>(x_i8.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:198:15 @@ -753,7 +799,7 @@ LL | foo::<u8>(x_usize); help: you can convert a `usize` to a `u8` and panic if the converted value doesn't fit | LL | foo::<u8>(x_usize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:200:15 @@ -764,7 +810,7 @@ LL | foo::<u8>(x_u64); help: you can convert a `u64` to a `u8` and panic if the converted value doesn't fit | LL | foo::<u8>(x_u64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:202:15 @@ -775,7 +821,7 @@ LL | foo::<u8>(x_u32); help: you can convert a `u32` to a `u8` and panic if the converted value doesn't fit | LL | foo::<u8>(x_u32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:204:15 @@ -786,7 +832,7 @@ LL | foo::<u8>(x_u16); help: you can convert a `u16` to a `u8` and panic if the converted value doesn't fit | LL | foo::<u8>(x_u16.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:207:15 @@ -797,7 +843,7 @@ LL | foo::<u8>(x_isize); help: you can convert an `isize` to a `u8` and panic if the converted value doesn't fit | LL | foo::<u8>(x_isize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:209:15 @@ -808,7 +854,7 @@ LL | foo::<u8>(x_i64); help: you can convert an `i64` to a `u8` and panic if the converted value doesn't fit | LL | foo::<u8>(x_i64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:211:15 @@ -819,7 +865,7 @@ LL | foo::<u8>(x_i32); help: you can convert an `i32` to a `u8` and panic if the converted value doesn't fit | LL | foo::<u8>(x_i32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:213:15 @@ -830,7 +876,7 @@ LL | foo::<u8>(x_i16); help: you can convert an `i16` to a `u8` and panic if the converted value doesn't fit | LL | foo::<u8>(x_i16.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:215:15 @@ -841,7 +887,7 @@ LL | foo::<u8>(x_i8); help: you can convert an `i8` to a `u8` and panic if the converted value doesn't fit | LL | foo::<u8>(x_i8.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:220:15 @@ -852,7 +898,7 @@ LL | foo::<i8>(x_usize); help: you can convert a `usize` to an `i8` and panic if the converted value doesn't fit | LL | foo::<i8>(x_usize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:222:15 @@ -863,7 +909,7 @@ LL | foo::<i8>(x_u64); help: you can convert a `u64` to an `i8` and panic if the converted value doesn't fit | LL | foo::<i8>(x_u64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:224:15 @@ -874,7 +920,7 @@ LL | foo::<i8>(x_u32); help: you can convert a `u32` to an `i8` and panic if the converted value doesn't fit | LL | foo::<i8>(x_u32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:226:15 @@ -885,7 +931,7 @@ LL | foo::<i8>(x_u16); help: you can convert a `u16` to an `i8` and panic if the converted value doesn't fit | LL | foo::<i8>(x_u16.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:228:15 @@ -896,7 +942,7 @@ LL | foo::<i8>(x_u8); help: you can convert a `u8` to an `i8` and panic if the converted value doesn't fit | LL | foo::<i8>(x_u8.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:230:15 @@ -907,7 +953,7 @@ LL | foo::<i8>(x_isize); help: you can convert an `isize` to an `i8` and panic if the converted value doesn't fit | LL | foo::<i8>(x_isize.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:232:15 @@ -918,7 +964,7 @@ LL | foo::<i8>(x_i64); help: you can convert an `i64` to an `i8` and panic if the converted value doesn't fit | LL | foo::<i8>(x_i64.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:234:15 @@ -929,7 +975,7 @@ LL | foo::<i8>(x_i32); help: you can convert an `i32` to an `i8` and panic if the converted value doesn't fit | LL | foo::<i8>(x_i32.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:236:15 @@ -940,7 +986,7 @@ LL | foo::<i8>(x_i16); help: you can convert an `i16` to an `i8` and panic if the converted value doesn't fit | LL | foo::<i8>(x_i16.try_into().unwrap()); - | ~~~~~~~~~~~~~~~~~~~~~~~~~ + | ++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:242:16 @@ -951,7 +997,7 @@ LL | foo::<f64>(x_usize); help: you can cast a `usize` to an `f64`, producing the floating point representation of the integer, | rounded if necessary LL | foo::<f64>(x_usize as f64); - | ~~~~~~~~~~~~~~ + | ++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:244:16 @@ -962,7 +1008,7 @@ LL | foo::<f64>(x_u64); help: you can cast a `u64` to an `f64`, producing the floating point representation of the integer, | rounded if necessary LL | foo::<f64>(x_u64 as f64); - | ~~~~~~~~~~~~ + | ++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:246:16 @@ -973,7 +1019,7 @@ LL | foo::<f64>(x_u32); help: you can convert a `u32` to an `f64`, producing the floating point representation of the integer | LL | foo::<f64>(x_u32.into()); - | ~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:248:16 @@ -984,7 +1030,7 @@ LL | foo::<f64>(x_u16); help: you can convert a `u16` to an `f64`, producing the floating point representation of the integer | LL | foo::<f64>(x_u16.into()); - | ~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:250:16 @@ -995,7 +1041,7 @@ LL | foo::<f64>(x_u8); help: you can convert a `u8` to an `f64`, producing the floating point representation of the integer | LL | foo::<f64>(x_u8.into()); - | ~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:252:16 @@ -1006,7 +1052,7 @@ LL | foo::<f64>(x_isize); help: you can convert an `isize` to an `f64`, producing the floating point representation of the integer, rounded if necessary | LL | foo::<f64>(x_isize as f64); - | ~~~~~~~~~~~~~~ + | ++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:254:16 @@ -1017,7 +1063,7 @@ LL | foo::<f64>(x_i64); help: you can convert an `i64` to an `f64`, producing the floating point representation of the integer, rounded if necessary | LL | foo::<f64>(x_i64 as f64); - | ~~~~~~~~~~~~ + | ++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:256:16 @@ -1028,7 +1074,7 @@ LL | foo::<f64>(x_i32); help: you can convert an `i32` to an `f64`, producing the floating point representation of the integer | LL | foo::<f64>(x_i32.into()); - | ~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:258:16 @@ -1039,7 +1085,7 @@ LL | foo::<f64>(x_i16); help: you can convert an `i16` to an `f64`, producing the floating point representation of the integer | LL | foo::<f64>(x_i16.into()); - | ~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:260:16 @@ -1050,16 +1096,18 @@ LL | foo::<f64>(x_i8); help: you can convert an `i8` to an `f64`, producing the floating point representation of the integer | LL | foo::<f64>(x_i8.into()); - | ~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:263:16 | LL | foo::<f64>(x_f32); - | ^^^^^ - | | - | expected `f64`, found `f32` - | help: you can convert an `f32` to an `f64`: `x_f32.into()` + | ^^^^^ expected `f64`, found `f32` + | +help: you can convert an `f32` to an `f64` + | +LL | foo::<f64>(x_f32.into()); + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:266:16 @@ -1070,7 +1118,7 @@ LL | foo::<f32>(x_usize); help: you can cast a `usize` to an `f32`, producing the floating point representation of the integer, | rounded if necessary LL | foo::<f32>(x_usize as f32); - | ~~~~~~~~~~~~~~ + | ++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:268:16 @@ -1081,7 +1129,7 @@ LL | foo::<f32>(x_u64); help: you can cast a `u64` to an `f32`, producing the floating point representation of the integer, | rounded if necessary LL | foo::<f32>(x_u64 as f32); - | ~~~~~~~~~~~~ + | ++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:270:16 @@ -1092,7 +1140,7 @@ LL | foo::<f32>(x_u32); help: you can cast a `u32` to an `f32`, producing the floating point representation of the integer, | rounded if necessary LL | foo::<f32>(x_u32 as f32); - | ~~~~~~~~~~~~ + | ++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:272:16 @@ -1103,7 +1151,7 @@ LL | foo::<f32>(x_u16); help: you can convert a `u16` to an `f32`, producing the floating point representation of the integer | LL | foo::<f32>(x_u16.into()); - | ~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:274:16 @@ -1114,7 +1162,7 @@ LL | foo::<f32>(x_u8); help: you can convert a `u8` to an `f32`, producing the floating point representation of the integer | LL | foo::<f32>(x_u8.into()); - | ~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:276:16 @@ -1125,7 +1173,7 @@ LL | foo::<f32>(x_isize); help: you can convert an `isize` to an `f32`, producing the floating point representation of the integer, rounded if necessary | LL | foo::<f32>(x_isize as f32); - | ~~~~~~~~~~~~~~ + | ++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:278:16 @@ -1136,7 +1184,7 @@ LL | foo::<f32>(x_i64); help: you can convert an `i64` to an `f32`, producing the floating point representation of the integer, rounded if necessary | LL | foo::<f32>(x_i64 as f32); - | ~~~~~~~~~~~~ + | ++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:280:16 @@ -1147,7 +1195,7 @@ LL | foo::<f32>(x_i32); help: you can convert an `i32` to an `f32`, producing the floating point representation of the integer, rounded if necessary | LL | foo::<f32>(x_i32 as f32); - | ~~~~~~~~~~~~ + | ++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:282:16 @@ -1158,7 +1206,7 @@ LL | foo::<f32>(x_i16); help: you can convert an `i16` to an `f32`, producing the floating point representation of the integer | LL | foo::<f32>(x_i16.into()); - | ~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:284:16 @@ -1169,25 +1217,29 @@ LL | foo::<f32>(x_i8); help: you can convert an `i8` to an `f32`, producing the floating point representation of the integer | LL | foo::<f32>(x_i8.into()); - | ~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:289:16 | LL | foo::<u32>(x_u8 as u16); - | ^^^^^^^^^^^ - | | - | expected `u32`, found `u16` - | help: you can convert a `u16` to a `u32`: `(x_u8 as u16).into()` + | ^^^^^^^^^^^ expected `u32`, found `u16` + | +help: you can convert a `u16` to a `u32` + | +LL | foo::<u32>((x_u8 as u16).into()); + | + ++++++++ error[E0308]: mismatched types --> $DIR/numeric-cast.rs:291:16 | LL | foo::<i32>(-x_i8); - | ^^^^^ - | | - | expected `i32`, found `i8` - | help: you can convert an `i8` to an `i32`: `(-x_i8).into()` + | ^^^^^ expected `i32`, found `i8` + | +help: you can convert an `i8` to an `i32` + | +LL | foo::<i32>((-x_i8).into()); + | + ++++++++ error: aborting due to 113 previous errors diff --git a/src/test/ui/numeric/numeric-suffix.stderr b/src/test/ui/numeric/numeric-suffix.stderr index d3f02214e3b..b829946e522 100644 --- a/src/test/ui/numeric/numeric-suffix.stderr +++ b/src/test/ui/numeric/numeric-suffix.stderr @@ -7,7 +7,7 @@ LL | foo::<usize>(42_u64); help: change the type of the numeric literal from `u64` to `usize` | LL | foo::<usize>(42_usize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:9:18 @@ -18,7 +18,7 @@ LL | foo::<usize>(42_u32); help: change the type of the numeric literal from `u32` to `usize` | LL | foo::<usize>(42_usize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:11:18 @@ -29,7 +29,7 @@ LL | foo::<usize>(42_u16); help: change the type of the numeric literal from `u16` to `usize` | LL | foo::<usize>(42_usize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:13:18 @@ -40,7 +40,7 @@ LL | foo::<usize>(42_u8); help: change the type of the numeric literal from `u8` to `usize` | LL | foo::<usize>(42_usize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:15:18 @@ -51,7 +51,7 @@ LL | foo::<usize>(42_isize); help: change the type of the numeric literal from `isize` to `usize` | LL | foo::<usize>(42_usize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:17:18 @@ -62,7 +62,7 @@ LL | foo::<usize>(42_i64); help: change the type of the numeric literal from `i64` to `usize` | LL | foo::<usize>(42_usize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:19:18 @@ -73,7 +73,7 @@ LL | foo::<usize>(42_i32); help: change the type of the numeric literal from `i32` to `usize` | LL | foo::<usize>(42_usize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:21:18 @@ -84,7 +84,7 @@ LL | foo::<usize>(42_i16); help: change the type of the numeric literal from `i16` to `usize` | LL | foo::<usize>(42_usize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:23:18 @@ -95,7 +95,7 @@ LL | foo::<usize>(42_i8); help: change the type of the numeric literal from `i8` to `usize` | LL | foo::<usize>(42_usize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:25:18 @@ -106,7 +106,7 @@ LL | foo::<usize>(42.0_f64); help: change the type of the numeric literal from `f64` to `usize` | LL | foo::<usize>(42usize); - | ~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:27:18 @@ -117,7 +117,7 @@ LL | foo::<usize>(42.0_f32); help: change the type of the numeric literal from `f32` to `usize` | LL | foo::<usize>(42usize); - | ~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:30:18 @@ -128,7 +128,7 @@ LL | foo::<isize>(42_usize); help: change the type of the numeric literal from `usize` to `isize` | LL | foo::<isize>(42_isize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:32:18 @@ -139,7 +139,7 @@ LL | foo::<isize>(42_u64); help: change the type of the numeric literal from `u64` to `isize` | LL | foo::<isize>(42_isize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:34:18 @@ -150,7 +150,7 @@ LL | foo::<isize>(42_u32); help: change the type of the numeric literal from `u32` to `isize` | LL | foo::<isize>(42_isize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:36:18 @@ -161,7 +161,7 @@ LL | foo::<isize>(42_u16); help: change the type of the numeric literal from `u16` to `isize` | LL | foo::<isize>(42_isize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:38:18 @@ -172,7 +172,7 @@ LL | foo::<isize>(42_u8); help: change the type of the numeric literal from `u8` to `isize` | LL | foo::<isize>(42_isize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:41:18 @@ -183,7 +183,7 @@ LL | foo::<isize>(42_i64); help: change the type of the numeric literal from `i64` to `isize` | LL | foo::<isize>(42_isize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:43:18 @@ -194,7 +194,7 @@ LL | foo::<isize>(42_i32); help: change the type of the numeric literal from `i32` to `isize` | LL | foo::<isize>(42_isize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:45:18 @@ -205,7 +205,7 @@ LL | foo::<isize>(42_i16); help: change the type of the numeric literal from `i16` to `isize` | LL | foo::<isize>(42_isize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:47:18 @@ -216,7 +216,7 @@ LL | foo::<isize>(42_i8); help: change the type of the numeric literal from `i8` to `isize` | LL | foo::<isize>(42_isize); - | ~~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:49:18 @@ -227,7 +227,7 @@ LL | foo::<isize>(42.0_f64); help: change the type of the numeric literal from `f64` to `isize` | LL | foo::<isize>(42isize); - | ~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:51:18 @@ -238,7 +238,7 @@ LL | foo::<isize>(42.0_f32); help: change the type of the numeric literal from `f32` to `isize` | LL | foo::<isize>(42isize); - | ~~~~~~~ + | ~~~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:54:16 @@ -249,7 +249,7 @@ LL | foo::<u64>(42_usize); help: change the type of the numeric literal from `usize` to `u64` | LL | foo::<u64>(42_u64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:57:16 @@ -260,7 +260,7 @@ LL | foo::<u64>(42_u32); help: change the type of the numeric literal from `u32` to `u64` | LL | foo::<u64>(42_u64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:59:16 @@ -271,7 +271,7 @@ LL | foo::<u64>(42_u16); help: change the type of the numeric literal from `u16` to `u64` | LL | foo::<u64>(42_u64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:61:16 @@ -282,7 +282,7 @@ LL | foo::<u64>(42_u8); help: change the type of the numeric literal from `u8` to `u64` | LL | foo::<u64>(42_u64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:63:16 @@ -293,7 +293,7 @@ LL | foo::<u64>(42_isize); help: change the type of the numeric literal from `isize` to `u64` | LL | foo::<u64>(42_u64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:65:16 @@ -304,7 +304,7 @@ LL | foo::<u64>(42_i64); help: change the type of the numeric literal from `i64` to `u64` | LL | foo::<u64>(42_u64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:67:16 @@ -315,7 +315,7 @@ LL | foo::<u64>(42_i32); help: change the type of the numeric literal from `i32` to `u64` | LL | foo::<u64>(42_u64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:69:16 @@ -326,7 +326,7 @@ LL | foo::<u64>(42_i16); help: change the type of the numeric literal from `i16` to `u64` | LL | foo::<u64>(42_u64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:71:16 @@ -337,7 +337,7 @@ LL | foo::<u64>(42_i8); help: change the type of the numeric literal from `i8` to `u64` | LL | foo::<u64>(42_u64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:73:16 @@ -348,7 +348,7 @@ LL | foo::<u64>(42.0_f64); help: change the type of the numeric literal from `f64` to `u64` | LL | foo::<u64>(42u64); - | ~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:75:16 @@ -359,7 +359,7 @@ LL | foo::<u64>(42.0_f32); help: change the type of the numeric literal from `f32` to `u64` | LL | foo::<u64>(42u64); - | ~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:78:16 @@ -370,7 +370,7 @@ LL | foo::<i64>(42_usize); help: change the type of the numeric literal from `usize` to `i64` | LL | foo::<i64>(42_i64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:80:16 @@ -381,7 +381,7 @@ LL | foo::<i64>(42_u64); help: change the type of the numeric literal from `u64` to `i64` | LL | foo::<i64>(42_i64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:82:16 @@ -392,7 +392,7 @@ LL | foo::<i64>(42_u32); help: change the type of the numeric literal from `u32` to `i64` | LL | foo::<i64>(42_i64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:84:16 @@ -403,7 +403,7 @@ LL | foo::<i64>(42_u16); help: change the type of the numeric literal from `u16` to `i64` | LL | foo::<i64>(42_i64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:86:16 @@ -414,7 +414,7 @@ LL | foo::<i64>(42_u8); help: change the type of the numeric literal from `u8` to `i64` | LL | foo::<i64>(42_i64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:88:16 @@ -425,7 +425,7 @@ LL | foo::<i64>(42_isize); help: change the type of the numeric literal from `isize` to `i64` | LL | foo::<i64>(42_i64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:91:16 @@ -436,7 +436,7 @@ LL | foo::<i64>(42_i32); help: change the type of the numeric literal from `i32` to `i64` | LL | foo::<i64>(42_i64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:93:16 @@ -447,7 +447,7 @@ LL | foo::<i64>(42_i16); help: change the type of the numeric literal from `i16` to `i64` | LL | foo::<i64>(42_i64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:95:16 @@ -458,7 +458,7 @@ LL | foo::<i64>(42_i8); help: change the type of the numeric literal from `i8` to `i64` | LL | foo::<i64>(42_i64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:97:16 @@ -469,7 +469,7 @@ LL | foo::<i64>(42.0_f64); help: change the type of the numeric literal from `f64` to `i64` | LL | foo::<i64>(42i64); - | ~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:99:16 @@ -480,7 +480,7 @@ LL | foo::<i64>(42.0_f32); help: change the type of the numeric literal from `f32` to `i64` | LL | foo::<i64>(42i64); - | ~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:102:16 @@ -491,7 +491,7 @@ LL | foo::<u32>(42_usize); help: change the type of the numeric literal from `usize` to `u32` | LL | foo::<u32>(42_u32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:104:16 @@ -502,7 +502,7 @@ LL | foo::<u32>(42_u64); help: change the type of the numeric literal from `u64` to `u32` | LL | foo::<u32>(42_u32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:107:16 @@ -513,7 +513,7 @@ LL | foo::<u32>(42_u16); help: change the type of the numeric literal from `u16` to `u32` | LL | foo::<u32>(42_u32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:109:16 @@ -524,7 +524,7 @@ LL | foo::<u32>(42_u8); help: change the type of the numeric literal from `u8` to `u32` | LL | foo::<u32>(42_u32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:111:16 @@ -535,7 +535,7 @@ LL | foo::<u32>(42_isize); help: change the type of the numeric literal from `isize` to `u32` | LL | foo::<u32>(42_u32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:113:16 @@ -546,7 +546,7 @@ LL | foo::<u32>(42_i64); help: change the type of the numeric literal from `i64` to `u32` | LL | foo::<u32>(42_u32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:115:16 @@ -557,7 +557,7 @@ LL | foo::<u32>(42_i32); help: change the type of the numeric literal from `i32` to `u32` | LL | foo::<u32>(42_u32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:117:16 @@ -568,7 +568,7 @@ LL | foo::<u32>(42_i16); help: change the type of the numeric literal from `i16` to `u32` | LL | foo::<u32>(42_u32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:119:16 @@ -579,7 +579,7 @@ LL | foo::<u32>(42_i8); help: change the type of the numeric literal from `i8` to `u32` | LL | foo::<u32>(42_u32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:121:16 @@ -590,7 +590,7 @@ LL | foo::<u32>(42.0_f64); help: change the type of the numeric literal from `f64` to `u32` | LL | foo::<u32>(42u32); - | ~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:123:16 @@ -601,7 +601,7 @@ LL | foo::<u32>(42.0_f32); help: change the type of the numeric literal from `f32` to `u32` | LL | foo::<u32>(42u32); - | ~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:126:16 @@ -612,7 +612,7 @@ LL | foo::<i32>(42_usize); help: change the type of the numeric literal from `usize` to `i32` | LL | foo::<i32>(42_i32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:128:16 @@ -623,7 +623,7 @@ LL | foo::<i32>(42_u64); help: change the type of the numeric literal from `u64` to `i32` | LL | foo::<i32>(42_i32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:130:16 @@ -634,7 +634,7 @@ LL | foo::<i32>(42_u32); help: change the type of the numeric literal from `u32` to `i32` | LL | foo::<i32>(42_i32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:132:16 @@ -645,7 +645,7 @@ LL | foo::<i32>(42_u16); help: change the type of the numeric literal from `u16` to `i32` | LL | foo::<i32>(42_i32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:134:16 @@ -656,7 +656,7 @@ LL | foo::<i32>(42_u8); help: change the type of the numeric literal from `u8` to `i32` | LL | foo::<i32>(42_i32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:136:16 @@ -667,7 +667,7 @@ LL | foo::<i32>(42_isize); help: change the type of the numeric literal from `isize` to `i32` | LL | foo::<i32>(42_i32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:138:16 @@ -678,7 +678,7 @@ LL | foo::<i32>(42_i64); help: change the type of the numeric literal from `i64` to `i32` | LL | foo::<i32>(42_i32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:141:16 @@ -689,7 +689,7 @@ LL | foo::<i32>(42_i16); help: change the type of the numeric literal from `i16` to `i32` | LL | foo::<i32>(42_i32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:143:16 @@ -700,7 +700,7 @@ LL | foo::<i32>(42_i8); help: change the type of the numeric literal from `i8` to `i32` | LL | foo::<i32>(42_i32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:145:16 @@ -711,7 +711,7 @@ LL | foo::<i32>(42.0_f64); help: change the type of the numeric literal from `f64` to `i32` | LL | foo::<i32>(42i32); - | ~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:147:16 @@ -722,7 +722,7 @@ LL | foo::<i32>(42.0_f32); help: change the type of the numeric literal from `f32` to `i32` | LL | foo::<i32>(42i32); - | ~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:150:16 @@ -733,7 +733,7 @@ LL | foo::<u16>(42_usize); help: change the type of the numeric literal from `usize` to `u16` | LL | foo::<u16>(42_u16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:152:16 @@ -744,7 +744,7 @@ LL | foo::<u16>(42_u64); help: change the type of the numeric literal from `u64` to `u16` | LL | foo::<u16>(42_u16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:154:16 @@ -755,7 +755,7 @@ LL | foo::<u16>(42_u32); help: change the type of the numeric literal from `u32` to `u16` | LL | foo::<u16>(42_u16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:157:16 @@ -766,7 +766,7 @@ LL | foo::<u16>(42_u8); help: change the type of the numeric literal from `u8` to `u16` | LL | foo::<u16>(42_u16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:159:16 @@ -777,7 +777,7 @@ LL | foo::<u16>(42_isize); help: change the type of the numeric literal from `isize` to `u16` | LL | foo::<u16>(42_u16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:161:16 @@ -788,7 +788,7 @@ LL | foo::<u16>(42_i64); help: change the type of the numeric literal from `i64` to `u16` | LL | foo::<u16>(42_u16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:163:16 @@ -799,7 +799,7 @@ LL | foo::<u16>(42_i32); help: change the type of the numeric literal from `i32` to `u16` | LL | foo::<u16>(42_u16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:165:16 @@ -810,7 +810,7 @@ LL | foo::<u16>(42_i16); help: change the type of the numeric literal from `i16` to `u16` | LL | foo::<u16>(42_u16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:167:16 @@ -821,7 +821,7 @@ LL | foo::<u16>(42_i8); help: change the type of the numeric literal from `i8` to `u16` | LL | foo::<u16>(42_u16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:169:16 @@ -832,7 +832,7 @@ LL | foo::<u16>(42.0_f64); help: change the type of the numeric literal from `f64` to `u16` | LL | foo::<u16>(42u16); - | ~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:171:16 @@ -843,7 +843,7 @@ LL | foo::<u16>(42.0_f32); help: change the type of the numeric literal from `f32` to `u16` | LL | foo::<u16>(42u16); - | ~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:174:16 @@ -854,7 +854,7 @@ LL | foo::<i16>(42_usize); help: change the type of the numeric literal from `usize` to `i16` | LL | foo::<i16>(42_i16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:176:16 @@ -865,7 +865,7 @@ LL | foo::<i16>(42_u64); help: change the type of the numeric literal from `u64` to `i16` | LL | foo::<i16>(42_i16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:178:16 @@ -876,7 +876,7 @@ LL | foo::<i16>(42_u32); help: change the type of the numeric literal from `u32` to `i16` | LL | foo::<i16>(42_i16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:180:16 @@ -887,7 +887,7 @@ LL | foo::<i16>(42_u16); help: change the type of the numeric literal from `u16` to `i16` | LL | foo::<i16>(42_i16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:182:16 @@ -898,7 +898,7 @@ LL | foo::<i16>(42_u8); help: change the type of the numeric literal from `u8` to `i16` | LL | foo::<i16>(42_i16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:184:16 @@ -909,7 +909,7 @@ LL | foo::<i16>(42_isize); help: change the type of the numeric literal from `isize` to `i16` | LL | foo::<i16>(42_i16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:186:16 @@ -920,7 +920,7 @@ LL | foo::<i16>(42_i64); help: change the type of the numeric literal from `i64` to `i16` | LL | foo::<i16>(42_i16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:188:16 @@ -931,7 +931,7 @@ LL | foo::<i16>(42_i32); help: change the type of the numeric literal from `i32` to `i16` | LL | foo::<i16>(42_i16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:191:16 @@ -942,7 +942,7 @@ LL | foo::<i16>(42_i8); help: change the type of the numeric literal from `i8` to `i16` | LL | foo::<i16>(42_i16); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:193:16 @@ -953,7 +953,7 @@ LL | foo::<i16>(42.0_f64); help: change the type of the numeric literal from `f64` to `i16` | LL | foo::<i16>(42i16); - | ~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:195:16 @@ -964,7 +964,7 @@ LL | foo::<i16>(42.0_f32); help: change the type of the numeric literal from `f32` to `i16` | LL | foo::<i16>(42i16); - | ~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:198:15 @@ -975,7 +975,7 @@ LL | foo::<u8>(42_usize); help: change the type of the numeric literal from `usize` to `u8` | LL | foo::<u8>(42_u8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:200:15 @@ -986,7 +986,7 @@ LL | foo::<u8>(42_u64); help: change the type of the numeric literal from `u64` to `u8` | LL | foo::<u8>(42_u8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:202:15 @@ -997,7 +997,7 @@ LL | foo::<u8>(42_u32); help: change the type of the numeric literal from `u32` to `u8` | LL | foo::<u8>(42_u8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:204:15 @@ -1008,7 +1008,7 @@ LL | foo::<u8>(42_u16); help: change the type of the numeric literal from `u16` to `u8` | LL | foo::<u8>(42_u8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:207:15 @@ -1019,7 +1019,7 @@ LL | foo::<u8>(42_isize); help: change the type of the numeric literal from `isize` to `u8` | LL | foo::<u8>(42_u8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:209:15 @@ -1030,7 +1030,7 @@ LL | foo::<u8>(42_i64); help: change the type of the numeric literal from `i64` to `u8` | LL | foo::<u8>(42_u8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:211:15 @@ -1041,7 +1041,7 @@ LL | foo::<u8>(42_i32); help: change the type of the numeric literal from `i32` to `u8` | LL | foo::<u8>(42_u8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:213:15 @@ -1052,7 +1052,7 @@ LL | foo::<u8>(42_i16); help: change the type of the numeric literal from `i16` to `u8` | LL | foo::<u8>(42_u8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:215:15 @@ -1063,7 +1063,7 @@ LL | foo::<u8>(42_i8); help: change the type of the numeric literal from `i8` to `u8` | LL | foo::<u8>(42_u8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:217:15 @@ -1074,7 +1074,7 @@ LL | foo::<u8>(42.0_f64); help: change the type of the numeric literal from `f64` to `u8` | LL | foo::<u8>(42u8); - | ~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:219:15 @@ -1085,7 +1085,7 @@ LL | foo::<u8>(42.0_f32); help: change the type of the numeric literal from `f32` to `u8` | LL | foo::<u8>(42u8); - | ~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:222:15 @@ -1096,7 +1096,7 @@ LL | foo::<i8>(42_usize); help: change the type of the numeric literal from `usize` to `i8` | LL | foo::<i8>(42_i8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:224:15 @@ -1107,7 +1107,7 @@ LL | foo::<i8>(42_u64); help: change the type of the numeric literal from `u64` to `i8` | LL | foo::<i8>(42_i8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:226:15 @@ -1118,7 +1118,7 @@ LL | foo::<i8>(42_u32); help: change the type of the numeric literal from `u32` to `i8` | LL | foo::<i8>(42_i8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:228:15 @@ -1129,7 +1129,7 @@ LL | foo::<i8>(42_u16); help: change the type of the numeric literal from `u16` to `i8` | LL | foo::<i8>(42_i8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:230:15 @@ -1140,7 +1140,7 @@ LL | foo::<i8>(42_u8); help: change the type of the numeric literal from `u8` to `i8` | LL | foo::<i8>(42_i8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:232:15 @@ -1151,7 +1151,7 @@ LL | foo::<i8>(42_isize); help: change the type of the numeric literal from `isize` to `i8` | LL | foo::<i8>(42_i8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:234:15 @@ -1162,7 +1162,7 @@ LL | foo::<i8>(42_i64); help: change the type of the numeric literal from `i64` to `i8` | LL | foo::<i8>(42_i8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:236:15 @@ -1173,7 +1173,7 @@ LL | foo::<i8>(42_i32); help: change the type of the numeric literal from `i32` to `i8` | LL | foo::<i8>(42_i8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:238:15 @@ -1184,7 +1184,7 @@ LL | foo::<i8>(42_i16); help: change the type of the numeric literal from `i16` to `i8` | LL | foo::<i8>(42_i8); - | ~~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:241:15 @@ -1195,7 +1195,7 @@ LL | foo::<i8>(42.0_f64); help: change the type of the numeric literal from `f64` to `i8` | LL | foo::<i8>(42i8); - | ~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:243:15 @@ -1206,7 +1206,7 @@ LL | foo::<i8>(42.0_f32); help: change the type of the numeric literal from `f32` to `i8` | LL | foo::<i8>(42i8); - | ~~~~ + | ~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:246:16 @@ -1217,7 +1217,7 @@ LL | foo::<f64>(42_usize); help: change the type of the numeric literal from `usize` to `f64` | LL | foo::<f64>(42_f64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:248:16 @@ -1228,7 +1228,7 @@ LL | foo::<f64>(42_u64); help: change the type of the numeric literal from `u64` to `f64` | LL | foo::<f64>(42_f64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:250:16 @@ -1239,7 +1239,7 @@ LL | foo::<f64>(42_u32); help: you can convert a `u32` to an `f64`, producing the floating point representation of the integer | LL | foo::<f64>(42_u32.into()); - | ~~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:252:16 @@ -1250,7 +1250,7 @@ LL | foo::<f64>(42_u16); help: you can convert a `u16` to an `f64`, producing the floating point representation of the integer | LL | foo::<f64>(42_u16.into()); - | ~~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:254:16 @@ -1261,7 +1261,7 @@ LL | foo::<f64>(42_u8); help: you can convert a `u8` to an `f64`, producing the floating point representation of the integer | LL | foo::<f64>(42_u8.into()); - | ~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:256:16 @@ -1272,7 +1272,7 @@ LL | foo::<f64>(42_isize); help: change the type of the numeric literal from `isize` to `f64` | LL | foo::<f64>(42_f64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:258:16 @@ -1283,7 +1283,7 @@ LL | foo::<f64>(42_i64); help: change the type of the numeric literal from `i64` to `f64` | LL | foo::<f64>(42_f64); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:260:16 @@ -1294,7 +1294,7 @@ LL | foo::<f64>(42_i32); help: you can convert an `i32` to an `f64`, producing the floating point representation of the integer | LL | foo::<f64>(42_i32.into()); - | ~~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:262:16 @@ -1305,7 +1305,7 @@ LL | foo::<f64>(42_i16); help: you can convert an `i16` to an `f64`, producing the floating point representation of the integer | LL | foo::<f64>(42_i16.into()); - | ~~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:264:16 @@ -1316,7 +1316,7 @@ LL | foo::<f64>(42_i8); help: you can convert an `i8` to an `f64`, producing the floating point representation of the integer | LL | foo::<f64>(42_i8.into()); - | ~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:267:16 @@ -1327,7 +1327,7 @@ LL | foo::<f64>(42.0_f32); help: change the type of the numeric literal from `f32` to `f64` | LL | foo::<f64>(42.0_f64); - | ~~~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:270:16 @@ -1338,7 +1338,7 @@ LL | foo::<f32>(42_usize); help: change the type of the numeric literal from `usize` to `f32` | LL | foo::<f32>(42_f32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:272:16 @@ -1349,7 +1349,7 @@ LL | foo::<f32>(42_u64); help: change the type of the numeric literal from `u64` to `f32` | LL | foo::<f32>(42_f32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:274:16 @@ -1360,7 +1360,7 @@ LL | foo::<f32>(42_u32); help: change the type of the numeric literal from `u32` to `f32` | LL | foo::<f32>(42_f32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:276:16 @@ -1371,7 +1371,7 @@ LL | foo::<f32>(42_u16); help: you can convert a `u16` to an `f32`, producing the floating point representation of the integer | LL | foo::<f32>(42_u16.into()); - | ~~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:278:16 @@ -1382,7 +1382,7 @@ LL | foo::<f32>(42_u8); help: you can convert a `u8` to an `f32`, producing the floating point representation of the integer | LL | foo::<f32>(42_u8.into()); - | ~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:280:16 @@ -1393,7 +1393,7 @@ LL | foo::<f32>(42_isize); help: change the type of the numeric literal from `isize` to `f32` | LL | foo::<f32>(42_f32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:282:16 @@ -1404,7 +1404,7 @@ LL | foo::<f32>(42_i64); help: change the type of the numeric literal from `i64` to `f32` | LL | foo::<f32>(42_f32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:284:16 @@ -1415,7 +1415,7 @@ LL | foo::<f32>(42_i32); help: change the type of the numeric literal from `i32` to `f32` | LL | foo::<f32>(42_f32); - | ~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:286:16 @@ -1426,7 +1426,7 @@ LL | foo::<f32>(42_i16); help: you can convert an `i16` to an `f32`, producing the floating point representation of the integer | LL | foo::<f32>(42_i16.into()); - | ~~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:288:16 @@ -1437,7 +1437,7 @@ LL | foo::<f32>(42_i8); help: you can convert an `i8` to an `f32`, producing the floating point representation of the integer | LL | foo::<f32>(42_i8.into()); - | ~~~~~~~~~~~~ + | +++++++ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:290:16 @@ -1448,25 +1448,29 @@ LL | foo::<f32>(42.0_f64); help: change the type of the numeric literal from `f64` to `f32` | LL | foo::<f32>(42.0_f32); - | ~~~~~~~~ + | ~~~ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:294:16 | LL | foo::<u32>(42_u8 as u16); - | ^^^^^^^^^^^^ - | | - | expected `u32`, found `u16` - | help: you can convert a `u16` to a `u32`: `(42_u8 as u16).into()` + | ^^^^^^^^^^^^ expected `u32`, found `u16` + | +help: you can convert a `u16` to a `u32` + | +LL | foo::<u32>((42_u8 as u16).into()); + | + ++++++++ error[E0308]: mismatched types --> $DIR/numeric-suffix.rs:296:16 | LL | foo::<i32>(-42_i8); - | ^^^^^^ - | | - | expected `i32`, found `i8` - | help: you can convert an `i8` to an `i32`: `(-42_i8).into()` + | ^^^^^^ expected `i32`, found `i8` + | +help: you can convert an `i8` to an `i32` + | +LL | foo::<i32>((-42_i8).into()); + | + ++++++++ error: aborting due to 134 previous errors |
