Incmpatible type for trait fn(self)
should suggest fn(&mut self)
instead of fn(self: &mut TypenameOfSelf)
#112036
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 compiler asks to fix
drop(self)
intodrop(self: &mut Foo)
and then suggests to just havedrop(&mut self)
. It should just straight up say Changeself
to&mut self
Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: