Improve diagnostics for missing associated types #60595
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-diagnostics
Area: Messages for errors, warnings, and lints
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.
When the user fails to specify associated types for a trait object, the span used for the label
associated type `Output` must be specified
is the entire trait object, when it should ideally just be the trait (bound) from which the associated type is missing.For example, we currently get:
when we really want something like:
Note that PR #59445 will ensure that there at least are two labels in the above example, which is more correct, although the spans of both labels will still be the entire trait object.
See also #59445 (comment).
CC @estebank @eddyb @Centril
The text was updated successfully, but these errors were encountered: