Improve error message for "return type cannot contain a projection or Self
..."
#78600
Labels
A-async-await
Area: Async & Await
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
AsyncAwait-Triaged
Async-await issues that have been triaged during a working group meeting.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Following the improvement for the diagnostic of the error reported in this issue #69276, it would be nice (depending on how #61949 is prioritized) to have the same error message when instead of returning
Self
the function returnsResult<Self, Error>
.When
Self
is returned I get a nice error message (on rustc 1.47):But if
Result<Self, Error>
is used I get:with no suggestion to spell the type.
Link to Playground
The text was updated successfully, but these errors were encountered: