Improve await error messaging for trait obligations #71137
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-bug
Category: This is a bug.
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen:
Instead, this happened:
Note that the await pointed to be the error message is wrong.
The code that gets the span for the await is here
rust/src/librustc_trait_selection/traits/error_reporting/suggestions.rs
Line 1340 in 32fb4dc
Meta
rustc --version --verbose
:I also see the same behaviour with:
The text was updated successfully, but these errors were encountered: