rust/src/test/ui/tutorial-suffix-inference-test.stderr

35 lines
1.1 KiB
Plaintext
Raw Normal View History

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
| ^
| |
| 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);
| ^ expected `u16`, found `i32`
|
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);
| ^ expected `u16`, found `isize`
|
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`.