impl Trait error message expected/found order are confusing #68561
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-impl-trait
Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.
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.
@jonas-schievink pointed out that the "expected/found" ordering for
-> impl trait
return types can be quite confusing:gives
Additionally, the second note is wrong (
()
isSized
).This does not happen when changing the code to use a boxed trait instead (expected and found are in the right order).
Originally posted by @jonas-schievink in #54326 (comment)
The text was updated successfully, but these errors were encountered: