Taking a mutable reference to self in a closure leads to suggestion to change "self" in function signature #111554
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
The output is already good without a closure. Somehow, putting the call in a closure changes the error message to one that's less helpful.
Other cases
Anything else?
I can't think of anything. I'm happy to answer any questions you have.
I'm building through cargo, so I'm not 100% sure of the rustc version, but I get:
The text was updated successfully, but these errors were encountered: