rust/src/test/ui/numeric/numeric-cast.stderr

1195 lines
36 KiB
Plaintext
Raw Normal View History

2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:23:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<usize>(x_u64);
| ^^^^^ expected `usize`, found `u64`
|
help: you can convert a `u64` to `usize` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<usize>(x_u64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:25:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<usize>(x_u32);
| ^^^^^ expected `usize`, found `u32`
|
help: you can convert a `u32` to `usize` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<usize>(x_u32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:27:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<usize>(x_u16);
| ^^^^^
| |
| expected `usize`, found `u16`
| help: you can convert a `u16` to `usize`: `x_u16.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:29:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<usize>(x_u8);
| ^^^^
| |
| expected `usize`, found `u8`
| help: you can convert a `u8` to `usize`: `x_u8.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:31:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<usize>(x_isize);
| ^^^^^^^ expected `usize`, found `isize`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<usize>(x_isize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:33:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<usize>(x_i64);
| ^^^^^ expected `usize`, found `i64`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i64` to `usize` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<usize>(x_i64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:35:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<usize>(x_i32);
| ^^^^^ expected `usize`, found `i32`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i32` to `usize` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<usize>(x_i32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:37:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<usize>(x_i16);
| ^^^^^ expected `usize`, found `i16`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i16` to `usize` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<usize>(x_i16.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:39:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<usize>(x_i8);
| ^^^^ expected `usize`, found `i8`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i8` to `usize` and panic if the converted value wouldn't fit
2018-01-06 23:10:51 -06:00
|
2019-04-21 17:44:23 -05:00
LL | foo::<usize>(x_i8.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:44:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<isize>(x_usize);
| ^^^^^^^ expected `isize`, found `usize`
|
help: you can convert a `usize` to `isize` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<isize>(x_usize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:46:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<isize>(x_u64);
| ^^^^^ expected `isize`, found `u64`
|
help: you can convert a `u64` to `isize` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<isize>(x_u64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:48:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<isize>(x_u32);
| ^^^^^ expected `isize`, found `u32`
|
help: you can convert a `u32` to `isize` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<isize>(x_u32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:50:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<isize>(x_u16);
| ^^^^^ expected `isize`, found `u16`
|
help: you can convert a `u16` to `isize` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<isize>(x_u16.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:52:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<isize>(x_u8);
| ^^^^
| |
| expected `isize`, found `u8`
| help: you can convert a `u8` to `isize`: `x_u8.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:55:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<isize>(x_i64);
| ^^^^^ expected `isize`, found `i64`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i64` to `isize` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<isize>(x_i64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:57:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<isize>(x_i32);
| ^^^^^ expected `isize`, found `i32`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<isize>(x_i32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:59:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<isize>(x_i16);
| ^^^^^
| |
| expected `isize`, found `i16`
| help: you can convert an `i16` to `isize`: `x_i16.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:61:18
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<isize>(x_i8);
| ^^^^
| |
| expected `isize`, found `i8`
| help: you can convert an `i8` to `isize`: `x_i8.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:66:16
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<u64>(x_usize);
| ^^^^^^^ expected `u64`, found `usize`
|
help: you can convert a `usize` to `u64` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u64>(x_usize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:69:16
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<u64>(x_u32);
2019-04-21 17:44:23 -05:00
| ^^^^^
| |
| expected `u64`, found `u32`
| help: you can convert a `u32` to `u64`: `x_u32.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:71:16
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<u64>(x_u16);
2019-04-21 17:44:23 -05:00
| ^^^^^
| |
| expected `u64`, found `u16`
| help: you can convert a `u16` to `u64`: `x_u16.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:73:16
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<u64>(x_u8);
2019-04-21 17:44:23 -05:00
| ^^^^
| |
| expected `u64`, found `u8`
| help: you can convert a `u8` to `u64`: `x_u8.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:75:16
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<u64>(x_isize);
| ^^^^^^^ expected `u64`, found `isize`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `isize` to `u64` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u64>(x_isize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:77:16
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<u64>(x_i64);
| ^^^^^ expected `u64`, found `i64`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i64` to `u64` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u64>(x_i64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:79:16
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<u64>(x_i32);
| ^^^^^ expected `u64`, found `i32`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i32` to `u64` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u64>(x_i32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:81:16
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<u64>(x_i16);
| ^^^^^ expected `u64`, found `i16`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i16` to `u64` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u64>(x_i16.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:83:16
2018-01-06 23:10:51 -06:00
|
2018-02-22 18:42:32 -06:00
LL | foo::<u64>(x_i8);
| ^^^^ expected `u64`, found `i8`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i8` to `u64` and panic if the converted value wouldn't fit
2018-01-06 23:10:51 -06:00
|
2019-04-21 17:44:23 -05:00
LL | foo::<u64>(x_i8.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:88:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i64>(x_usize);
| ^^^^^^^ expected `i64`, found `usize`
|
help: you can convert a `usize` to `i64` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i64>(x_usize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:90:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i64>(x_u64);
| ^^^^^ expected `i64`, found `u64`
|
help: you can convert a `u64` to `i64` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i64>(x_u64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:92:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i64>(x_u32);
| ^^^^^
| |
| expected `i64`, found `u32`
| help: you can convert a `u32` to `i64`: `x_u32.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:94:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i64>(x_u16);
| ^^^^^
| |
| expected `i64`, found `u16`
| help: you can convert a `u16` to `i64`: `x_u16.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:96:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i64>(x_u8);
| ^^^^
| |
| expected `i64`, found `u8`
| help: you can convert a `u8` to `i64`: `x_u8.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:98:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i64>(x_isize);
| ^^^^^^^ expected `i64`, found `isize`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `isize` to `i64` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i64>(x_isize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:101:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i64>(x_i32);
2019-04-21 17:44:23 -05:00
| ^^^^^
| |
| expected `i64`, found `i32`
2019-04-21 17:44:23 -05:00
| help: you can convert an `i32` to `i64`: `x_i32.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:103:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i64>(x_i16);
2019-04-21 17:44:23 -05:00
| ^^^^^
| |
| expected `i64`, found `i16`
2019-04-21 17:44:23 -05:00
| help: you can convert an `i16` to `i64`: `x_i16.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:105:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i64>(x_i8);
2019-04-21 17:44:23 -05:00
| ^^^^
| |
| expected `i64`, found `i8`
2019-04-21 17:44:23 -05:00
| help: you can convert an `i8` to `i64`: `x_i8.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/numeric-cast.rs:110:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u32>(x_usize);
| ^^^^^^^ expected `u32`, found `usize`
|
help: you can convert a `usize` to `u32` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u32>(x_usize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:112:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u32>(x_u64);
| ^^^^^ expected `u32`, found `u64`
|
help: you can convert a `u64` to `u32` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u32>(x_u64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:115:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u32>(x_u16);
2019-04-21 17:44:23 -05:00
| ^^^^^
| |
| expected `u32`, found `u16`
| help: you can convert a `u16` to `u32`: `x_u16.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:117:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u32>(x_u8);
2019-04-21 17:44:23 -05:00
| ^^^^
| |
| expected `u32`, found `u8`
| help: you can convert a `u8` to `u32`: `x_u8.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:119:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u32>(x_isize);
| ^^^^^^^ expected `u32`, found `isize`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `isize` to `u32` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u32>(x_isize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:121:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u32>(x_i64);
| ^^^^^ expected `u32`, found `i64`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i64` to `u32` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u32>(x_i64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:123:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u32>(x_i32);
| ^^^^^ expected `u32`, found `i32`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i32` to `u32` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u32>(x_i32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:125:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u32>(x_i16);
| ^^^^^ expected `u32`, found `i16`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i16` to `u32` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u32>(x_i16.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:127:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u32>(x_i8);
| ^^^^ expected `u32`, found `i8`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i8` to `u32` and panic if the converted value wouldn't fit
2018-02-22 18:42:32 -06:00
|
2019-04-21 17:44:23 -05:00
LL | foo::<u32>(x_i8.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:132:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i32>(x_usize);
| ^^^^^^^ expected `i32`, found `usize`
|
help: you can convert a `usize` to `i32` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i32>(x_usize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:134:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i32>(x_u64);
| ^^^^^ expected `i32`, found `u64`
|
help: you can convert a `u64` to `i32` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i32>(x_u64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:136:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i32>(x_u32);
| ^^^^^ expected `i32`, found `u32`
|
help: you can convert a `u32` to `i32` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i32>(x_u32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:138:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i32>(x_u16);
| ^^^^^
| |
| expected `i32`, found `u16`
| help: you can convert a `u16` to `i32`: `x_u16.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:140:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i32>(x_u8);
| ^^^^
| |
| expected `i32`, found `u8`
| help: you can convert a `u8` to `i32`: `x_u8.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:142:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i32>(x_isize);
| ^^^^^^^ expected `i32`, found `isize`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `isize` to `i32` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i32>(x_isize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:144:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i32>(x_i64);
| ^^^^^ expected `i32`, found `i64`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i64` to `i32` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i32>(x_i64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:147:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i32>(x_i16);
2019-04-21 17:44:23 -05:00
| ^^^^^
| |
| expected `i32`, found `i16`
2019-04-21 17:44:23 -05:00
| help: you can convert an `i16` to `i32`: `x_i16.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:149:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i32>(x_i8);
2019-04-21 17:44:23 -05:00
| ^^^^
| |
| expected `i32`, found `i8`
2019-04-21 17:44:23 -05:00
| help: you can convert an `i8` to `i32`: `x_i8.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:154:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u16>(x_usize);
| ^^^^^^^ expected `u16`, found `usize`
|
help: you can convert a `usize` to `u16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u16>(x_usize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:156:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u16>(x_u64);
| ^^^^^ expected `u16`, found `u64`
|
help: you can convert a `u64` to `u16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u16>(x_u64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:158:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u16>(x_u32);
| ^^^^^ expected `u16`, found `u32`
|
help: you can convert a `u32` to `u16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u16>(x_u32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:161:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u16>(x_u8);
2019-04-21 17:44:23 -05:00
| ^^^^
| |
| expected `u16`, found `u8`
| help: you can convert a `u8` to `u16`: `x_u8.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:163:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u16>(x_isize);
| ^^^^^^^ expected `u16`, found `isize`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u16>(x_isize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:165:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u16>(x_i64);
| ^^^^^ expected `u16`, found `i64`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i64` to `u16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u16>(x_i64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:167:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u16>(x_i32);
| ^^^^^ expected `u16`, found `i32`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u16>(x_i32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:169:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u16>(x_i16);
| ^^^^^ expected `u16`, found `i16`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i16` to `u16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u16>(x_i16.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:171:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u16>(x_i8);
| ^^^^ expected `u16`, found `i8`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i8` to `u16` and panic if the converted value wouldn't fit
2018-02-22 18:42:32 -06:00
|
2019-04-21 17:44:23 -05:00
LL | foo::<u16>(x_i8.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:176:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i16>(x_usize);
| ^^^^^^^ expected `i16`, found `usize`
|
help: you can convert a `usize` to `i16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i16>(x_usize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:178:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i16>(x_u64);
| ^^^^^ expected `i16`, found `u64`
|
help: you can convert a `u64` to `i16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i16>(x_u64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:180:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i16>(x_u32);
| ^^^^^ expected `i16`, found `u32`
|
help: you can convert a `u32` to `i16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i16>(x_u32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:182:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i16>(x_u16);
| ^^^^^ expected `i16`, found `u16`
|
help: you can convert a `u16` to `i16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i16>(x_u16.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:184:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i16>(x_u8);
| ^^^^
| |
| expected `i16`, found `u8`
| help: you can convert a `u8` to `i16`: `x_u8.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:186:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i16>(x_isize);
| ^^^^^^^ expected `i16`, found `isize`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `isize` to `i16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i16>(x_isize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:188:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i16>(x_i64);
| ^^^^^ expected `i16`, found `i64`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i64` to `i16` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i16>(x_i64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:190:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i16>(x_i32);
| ^^^^^ expected `i16`, found `i32`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i32` to `i16` and panic if the converted value wouldn't fit
2018-02-22 18:42:32 -06:00
|
2019-04-21 17:44:23 -05:00
LL | foo::<i16>(x_i32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:193:16
2018-02-22 18:42:32 -06:00
|
2019-04-21 17:44:23 -05:00
LL | foo::<i16>(x_i8);
| ^^^^
| |
| expected `i16`, found `i8`
2019-04-21 17:44:23 -05:00
| help: you can convert an `i8` to `i16`: `x_i8.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:198:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<u8>(x_usize);
| ^^^^^^^ expected `u8`, found `usize`
|
help: you can convert a `usize` to `u8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u8>(x_usize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:200:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<u8>(x_u64);
| ^^^^^ expected `u8`, found `u64`
|
help: you can convert a `u64` to `u8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u8>(x_u64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:202:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<u8>(x_u32);
| ^^^^^ expected `u8`, found `u32`
|
help: you can convert a `u32` to `u8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u8>(x_u32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:204:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<u8>(x_u16);
| ^^^^^ expected `u8`, found `u16`
|
help: you can convert a `u16` to `u8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u8>(x_u16.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:207:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<u8>(x_isize);
| ^^^^^^^ expected `u8`, found `isize`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `isize` to `u8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u8>(x_isize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:209:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<u8>(x_i64);
| ^^^^^ expected `u8`, found `i64`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i64` to `u8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u8>(x_i64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:211:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<u8>(x_i32);
| ^^^^^ expected `u8`, found `i32`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i32` to `u8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u8>(x_i32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:213:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<u8>(x_i16);
| ^^^^^ expected `u8`, found `i16`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i16` to `u8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<u8>(x_i16.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:215:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<u8>(x_i8);
| ^^^^ expected `u8`, found `i8`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i8` to `u8` and panic if the converted value wouldn't fit
2018-02-22 18:42:32 -06:00
|
2019-04-21 17:44:23 -05:00
LL | foo::<u8>(x_i8.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:220:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<i8>(x_usize);
| ^^^^^^^ expected `i8`, found `usize`
|
help: you can convert a `usize` to `i8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i8>(x_usize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:222:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<i8>(x_u64);
| ^^^^^ expected `i8`, found `u64`
|
help: you can convert a `u64` to `i8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i8>(x_u64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:224:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<i8>(x_u32);
| ^^^^^ expected `i8`, found `u32`
|
help: you can convert a `u32` to `i8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i8>(x_u32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:226:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<i8>(x_u16);
| ^^^^^ expected `i8`, found `u16`
|
help: you can convert a `u16` to `i8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i8>(x_u16.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:228:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<i8>(x_u8);
| ^^^^ expected `i8`, found `u8`
|
help: you can convert a `u8` to `i8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i8>(x_u8.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:230:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<i8>(x_isize);
| ^^^^^^^ expected `i8`, found `isize`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `isize` to `i8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i8>(x_isize.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:232:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<i8>(x_i64);
| ^^^^^ expected `i8`, found `i64`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i64` to `i8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i8>(x_i64.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:234:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<i8>(x_i32);
| ^^^^^ expected `i8`, found `i32`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i32` to `i8` and panic if the converted value wouldn't fit
2019-04-21 17:44:23 -05:00
|
LL | foo::<i8>(x_i32.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:236:15
2018-02-22 18:42:32 -06:00
|
LL | foo::<i8>(x_i16);
| ^^^^^ expected `i8`, found `i16`
|
2019-05-03 12:41:26 -05:00
help: you can convert an `i16` to `i8` and panic if the converted value wouldn't fit
2018-02-22 18:42:32 -06:00
|
2019-04-21 17:44:23 -05:00
LL | foo::<i8>(x_i16.try_into().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:242:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f64>(x_usize);
| ^^^^^^^ expected `f64`, found `usize`
|
help: you can cast a `usize to `f64`, producing the floating point representation of the integer,
2019-04-21 17:44:23 -05:00
| rounded if necessary
LL | foo::<f64>(x_usize as f64);
| ^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:244:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f64>(x_u64);
| ^^^^^ expected `f64`, found `u64`
|
help: you can cast a `u64 to `f64`, producing the floating point representation of the integer,
2019-04-21 17:44:23 -05:00
| rounded if necessary
LL | foo::<f64>(x_u64 as f64);
| ^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:246:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f64>(x_u32);
| ^^^^^ expected `f64`, found `u32`
|
help: you can convert a `u32` to `f64`, producing the floating point representation of the integer
2018-02-22 18:42:32 -06:00
|
2018-02-24 17:01:39 -06:00
LL | foo::<f64>(x_u32.into());
2018-02-22 18:42:32 -06:00
| ^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:248:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f64>(x_u16);
| ^^^^^ expected `f64`, found `u16`
|
help: you can convert a `u16` to `f64`, producing the floating point representation of the integer
2018-02-22 18:42:32 -06:00
|
2018-02-24 17:01:39 -06:00
LL | foo::<f64>(x_u16.into());
2018-02-22 18:42:32 -06:00
| ^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:250:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f64>(x_u8);
| ^^^^ expected `f64`, found `u8`
|
help: you can convert a `u8` to `f64`, producing the floating point representation of the integer
2018-02-22 18:42:32 -06:00
|
2018-02-24 17:01:39 -06:00
LL | foo::<f64>(x_u8.into());
2018-02-22 18:42:32 -06:00
| ^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:252:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f64>(x_isize);
| ^^^^^^^ expected `f64`, found `isize`
|
2019-04-21 17:44:23 -05:00
help: you can convert an `isize` to `f64`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f64>(x_isize as f64);
| ^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:254:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f64>(x_i64);
| ^^^^^ expected `f64`, found `i64`
|
2019-04-21 17:44:23 -05:00
help: you can convert an `i64` to `f64`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f64>(x_i64 as f64);
| ^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:256:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f64>(x_i32);
| ^^^^^ expected `f64`, found `i32`
|
2019-04-21 17:44:23 -05:00
help: you can convert an `i32` to `f64`, producing the floating point representation of the integer
2018-02-22 18:42:32 -06:00
|
2018-02-24 17:01:39 -06:00
LL | foo::<f64>(x_i32.into());
2018-02-22 18:42:32 -06:00
| ^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:258:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f64>(x_i16);
| ^^^^^ expected `f64`, found `i16`
|
2019-04-21 17:44:23 -05:00
help: you can convert an `i16` to `f64`, producing the floating point representation of the integer
2018-02-22 18:42:32 -06:00
|
2018-02-24 17:01:39 -06:00
LL | foo::<f64>(x_i16.into());
2018-02-22 18:42:32 -06:00
| ^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:260:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f64>(x_i8);
| ^^^^ expected `f64`, found `i8`
|
2019-04-21 17:44:23 -05:00
help: you can convert an `i8` to `f64`, producing the floating point representation of the integer
2018-02-22 18:42:32 -06:00
|
2018-02-24 17:01:39 -06:00
LL | foo::<f64>(x_i8.into());
2018-02-22 18:42:32 -06:00
| ^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:263:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f64>(x_f32);
2019-04-21 17:44:23 -05:00
| ^^^^^
| |
| expected `f64`, found `f32`
2019-04-21 17:44:23 -05:00
| help: you can convert an `f32` to `f64`: `x_f32.into()`
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:266:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f32>(x_usize);
| ^^^^^^^ expected `f32`, found `usize`
|
help: you can cast a `usize to `f32`, producing the floating point representation of the integer,
2019-04-21 17:44:23 -05:00
| rounded if necessary
LL | foo::<f32>(x_usize as f32);
| ^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:268:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f32>(x_u64);
| ^^^^^ expected `f32`, found `u64`
|
help: you can cast a `u64 to `f32`, producing the floating point representation of the integer,
2019-04-21 17:44:23 -05:00
| rounded if necessary
LL | foo::<f32>(x_u64 as f32);
| ^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:270:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f32>(x_u32);
| ^^^^^ expected `f32`, found `u32`
|
help: you can cast a `u32 to `f32`, producing the floating point representation of the integer,
2019-04-21 17:44:23 -05:00
| rounded if necessary
LL | foo::<f32>(x_u32 as f32);
| ^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:272:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f32>(x_u16);
| ^^^^^ expected `f32`, found `u16`
|
help: you can convert a `u16` to `f32`, producing the floating point representation of the integer
2018-02-22 18:42:32 -06:00
|
2018-02-24 17:01:39 -06:00
LL | foo::<f32>(x_u16.into());
2018-02-22 18:42:32 -06:00
| ^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:274:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f32>(x_u8);
| ^^^^ expected `f32`, found `u8`
|
help: you can convert a `u8` to `f32`, producing the floating point representation of the integer
2018-02-22 18:42:32 -06:00
|
2018-02-24 17:01:39 -06:00
LL | foo::<f32>(x_u8.into());
2018-02-22 18:42:32 -06:00
| ^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:276:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f32>(x_isize);
| ^^^^^^^ expected `f32`, found `isize`
|
2019-04-21 17:44:23 -05:00
help: you can convert an `isize` to `f32`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f32>(x_isize as f32);
| ^^^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:278:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f32>(x_i64);
| ^^^^^ expected `f32`, found `i64`
|
2019-04-21 17:44:23 -05:00
help: you can convert an `i64` to `f32`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f32>(x_i64 as f32);
| ^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:280:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f32>(x_i32);
| ^^^^^ expected `f32`, found `i32`
|
2019-04-21 17:44:23 -05:00
help: you can convert an `i32` to `f32`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f32>(x_i32 as f32);
| ^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:282:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f32>(x_i16);
| ^^^^^ expected `f32`, found `i16`
|
2019-04-21 17:44:23 -05:00
help: you can convert an `i16` to `f32`, producing the floating point representation of the integer
2018-02-22 18:42:32 -06:00
|
2018-02-24 17:01:39 -06:00
LL | foo::<f32>(x_i16.into());
2018-02-22 18:42:32 -06:00
| ^^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:284:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<f32>(x_i8);
| ^^^^ expected `f32`, found `i8`
|
2019-04-21 17:44:23 -05:00
help: you can convert an `i8` to `f32`, producing the floating point representation of the integer
2018-02-22 18:42:32 -06:00
|
2018-02-24 17:01:39 -06:00
LL | foo::<f32>(x_i8.into());
2018-02-22 18:42:32 -06:00
| ^^^^^^^^^^^
2018-01-06 23:10:51 -06:00
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:289:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<u32>(x_u8 as u16);
2019-04-21 17:44:23 -05:00
| ^^^^^^^^^^^
| |
| expected `u32`, found `u16`
| help: you can convert a `u16` to `u32`: `(x_u8 as u16).into()`
error[E0308]: mismatched types
2019-04-21 17:44:23 -05:00
--> $DIR/numeric-cast.rs:291:16
2018-02-22 18:42:32 -06:00
|
LL | foo::<i32>(-x_i8);
2019-04-21 17:44:23 -05:00
| ^^^^^
| |
| expected `i32`, found `i8`
2019-04-21 17:44:23 -05:00
| help: you can convert an `i8` to `i32`: `(-x_i8).into()`
2019-04-21 17:44:23 -05:00
error: aborting due to 113 previous errors
2018-01-06 23:10:51 -06:00
2018-03-03 08:59:40 -06:00
For more information about this error, try `rustc --explain E0308`.