Make "cannot move out of borrowed content" more beginner friendly #55153
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
NLL-diagnostics
Working towards the "diagnostic parity" goal
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code emits "cannot move out of borrowed content" without any hint about the reason whatsoever. I think we should add a "help" pointing to the
self
argument oftalk
and stating something along the lines of "because of consuming argument here". If it's in the same crate, maybe even suggest to change it to a reference.(Playground)
Errors:
The text was updated successfully, but these errors were encountered: