before suggesting ?Sized
, check where clause for explicit Sized
#85945
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-trait-system
Area: Trait system
A-type-system
Area: Type system
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.
Given the following code: (playground)
The current output is:
Ideally, the diagnostic shouldn't suggest relaxing an explicit
Sized
bound in the where clause. (There is already code that skips the?Sized
suggestion for type parameters that have an explicitSized
bound.)I can work on this in an in-progress pull request where I'm making other improvements to unsized suggestions.
@rustbot claim
@rustbot label +A-traits +A-typesystem +D-papercut
The text was updated successfully, but these errors were encountered: