Nonsensical suggestion on closure param type error #114180
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
The text was updated successfully, but these errors were encountered: