Confusing error message when expecting BoxFuture #68197
Labels
A-async-await
Area: Async & Await
A-diagnostics
Area: Messages for errors, warnings, and lints
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.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Playground
gives
The
expected struct std::pin::Pin
in particular is confusing. This can be a pretty intimidating error message for someone new to async/await, when all they forgot was.boxed()
.I'm not sure if we can fix this without stabilizing
BoxFuture
so we can sprinkle some magic compiler dust on its error messages. Maybe there's something we can do, though. Maybe some intelligent use of type aliases in our error messages?cc @JakeEhrlich
The text was updated successfully, but these errors were encountered: