Rework method disambiguation error to use structured suggestions #62922
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Taken from #62921 (comment)
#62921 will extend the amount of times we display the disambiguated syntax in cases where multiple traits with the method being called is displayed in the following way:
It'd be a good idea to take a hard look at this and come up with better output that hopefully is as easy to understand while also incorporating structured suggestions. Sadly, given the current diagnostic machinery, suggestions are shown always at the end, which wouldn't let us show the suggestions interleaved with the notes. The closest we could get is something like the following:
It looks a bit too verbose, but that might be ok.
The text was updated successfully, but these errors were encountered: