Error for using a by-ref closure when by-move was needed could be improved #24909
Labels
A-closures
Area: Closures (`|…| { … }`)
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.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Errors with:
When the real solution here is to add the
move
keyword to the closure, but the error message leaves everyone quite confused.The text was updated successfully, but these errors were encountered: