-
-
Notifications
You must be signed in to change notification settings - Fork 15k
before suggesting ?Sized, check where clause for explicit Sized #85945
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-trait-systemArea: Trait systemArea: Trait systemA-type-systemArea: Type systemArea: Type systemD-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-trait-systemArea: Trait systemArea: Trait systemA-type-systemArea: Type systemArea: Type systemD-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Given the following code: (playground)
The current output is:
Ideally, the diagnostic shouldn't suggest relaxing an explicit
Sizedbound in the where clause. (There is already code that skips the?Sizedsuggestion for type parameters that have an explicitSizedbound.)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