Show the location of a type usage for trait bound failures #66444
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-papercut
Diagnostics: An error or lint that needs small tweaks.
S-needs-repro
Status: This issue has no reproduction and needs a reproduction to make progress.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
cc @estebank
The following diagnostic doesn't tell the user anything about where the type that causes the failure is coming from. I understand that we can't report a correct source site, but we could create a heuristic:
Instead of having a
note:
without an associated span, we could check where (if at all) the type is used in the function and report those spans as potential sources of the error. Though I'm not sure what would be needed to fiddle this information through to the diagnostic reporting site.(Playground)
Errors:
The text was updated successfully, but these errors were encountered: