rust/tests/ui/tail-typeck.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
562 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/tail-typeck.rs:3:26
2018-08-08 07:28:26 -05:00
|
LL | fn f() -> isize { return g(); }
| ----- ^^^ expected `isize`, found `usize`
2019-01-18 02:12:09 -06:00
| |
| expected `isize` because of return type
|
help: you can convert a `usize` to an `isize` and panic if the converted value doesn't fit
|
LL | fn f() -> isize { return g().try_into().unwrap(); }
| ++++++++++++++++++++
2018-08-08 07:28:26 -05:00
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.