&&self
suggestion from compiler
#131084
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
Maybe the user forgot to add the
self
parameter in the code. Or maybe they forgot to renamesome_name
toself
while refactoring the code. Either way, for beginners, the compiler suggesting to use&&self
instead ofself
or&self
may be confusing.Rust Version
rustc 1.81.0 (eeb90cd 2024-09-04)
binary: rustc
commit-hash: eeb90cd
commit-date: 2024-09-04
host: aarch64-apple-darwin
release: 1.81.0
LLVM version: 18.1.7
The text was updated successfully, but these errors were encountered: