2018-08-08 20:28:26 +08:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 23:56:47 +08:00
|
|
|
--> $DIR/tail-typeck.rs:3:26
|
2018-08-08 20:28:26 +08:00
|
|
|
|
|
|
|
|
LL | fn f() -> isize { return g(); }
|
2019-11-16 01:37:01 +08:00
|
|
|
| ----- ^^^ expected `isize`, found `usize`
|
2019-01-18 16:12:09 +08:00
|
|
|
| |
|
|
|
|
| expected `isize` because of return type
|
2019-12-04 09:32:50 +08:00
|
|
|
|
|
2020-09-30 10:27:58 +08:00
|
|
|
help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit
|
2019-12-04 09:32:50 +08:00
|
|
|
|
|
|
|
|
LL | fn f() -> isize { return g().try_into().unwrap(); }
|
2021-08-10 18:53:43 +08:00
|
|
|
| ++++++++++++++++++++
|
2018-08-08 20:28:26 +08:00
|
|
|
|
2023-11-21 23:44:16 +08:00
|
|
|
error: aborting due to 1 previous error
|
2018-08-08 20:28:26 +08:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|