-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Nonsensical suggestion on closure param type error #114180
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.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 lintsC-bugCategory: This is a bug.Category: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.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.
Code
Current output
Desired output
I don't know. There is an HRTB involved here, and I'm not sure there is any simple suggestion that fixes this code. But certainly the current suggestion should not be there.Rationale and extra context
Currently, the compiler outputs the following suggestion after the type error:
This is syntactically invalid code.
Other cases
No response
Anything else?
I'm using 1.70 stable and getting this. I also get it with 1.71 stable on the rust playground.