2018-08-08 14:28:26 +02:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/tutorial-suffix-inference-test.rs:9:18
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | identity_u16(x);
|
2019-04-21 15:44:23 -07:00
|
|
|
| ^
|
|
|
|
| |
|
2019-11-15 09:37:01 -08:00
|
|
|
| expected `u16`, found `u8`
|
2019-04-21 15:44:23 -07:00
|
|
|
| help: you can convert an `u8` to `u16`: `x.into()`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/tutorial-suffix-inference-test.rs:12:18
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | identity_u16(y);
|
2019-11-15 09:37:01 -08:00
|
|
|
| ^ expected `u16`, found `i32`
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-05-03 10:41:26 -07:00
|
|
|
help: you can convert an `i32` to `u16` and panic if the converted value wouldn't fit
|
2019-04-21 15:44:23 -07:00
|
|
|
|
|
|
|
|
LL | identity_u16(y.try_into().unwrap());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/tutorial-suffix-inference-test.rs:21:18
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
|
LL | identity_u16(a);
|
2019-11-15 09:37:01 -08:00
|
|
|
| ^ expected `u16`, found `isize`
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-05-03 10:41:26 -07:00
|
|
|
help: you can convert an `isize` to `u16` and panic if the converted value wouldn't fit
|
2019-04-21 15:44:23 -07:00
|
|
|
|
|
|
|
|
LL | identity_u16(a.try_into().unwrap());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|