trait Trait {}
fn foo() -> impl Trait {
0u8
}
Currently emits
error[E0277]: the trait bound `u8: Trait` is not satisfied
--> src/lib.rs:3:13
|
3 | fn foo() -> impl Trait {
| ^^^^^^^^^^ the trait `Trait` is not implemented for `u8`
It should probably point to the return value as the span of the actual error, with the current span appearing in a note, e.g.
error[E0277]: the trait bound `u8: Trait` is not satisfied
--> src/lib.rs:4:4
|
3 | fn foo() -> impl Trait {
| ---------- the return value of this function must implement `Trait`
4 | 0u8
| ^^^ the trait `Trait` is not implemented for `u8`
@rustbot label T-compiler A-impl-trait A-diagnostics D-terse
Currently emits
It should probably point to the return value as the span of the actual error, with the current span appearing in a note, e.g.
@rustbot label T-compiler A-impl-trait A-diagnostics D-terse