compiler suggests "&mut mut" #69789
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
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.
I was messing around with this function
After I changed the last block to
The compiler gave this interesting but wrong suggestion:
&mut mut map.values()
which does not compiler obviously 😄
The correct solution would be to use
&mut map.values_mut()
:The text was updated successfully, but these errors were encountered: