rust/tests/ui/trivial-bounds/trivial-bounds-inconsistent-projection-error.stderr

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

18 lines
572 B
Plaintext
Raw Normal View History

error[E0308]: mismatched types
2018-12-25 15:56:47 +00:00
--> $DIR/trivial-bounds-inconsistent-projection-error.rs:20:5
|
LL | fn global_bound_is_hidden() -> u8
| -- expected `u8` because of return type
...
2019-03-09 12:03:44 +00:00
LL | B::get_x()
| ^^^^^^^^^^ expected `u8`, found `i32`
|
help: you can convert an `i32` to a `u8` and panic if the converted value doesn't fit
2019-04-21 22:44:23 +00:00
|
LL | B::get_x().try_into().unwrap()
| ++++++++++++++++++++
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0308`.