-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suboptimal error when moving a Copy type in a closure #58497
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.
Comments
jonas-schievink
added
A-diagnostics
Area: Messages for errors, warnings, and lints
A-closures
Area: Closures (`|…| { … }`)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Feb 15, 2019
For future reference, the full current output is:
|
Current output:
|
estebank
added
the
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
label
Oct 9, 2019
crlf0710
added
the
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
label
Jun 11, 2020
The original report is fixed:
|
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 7, 2023
…twco Detect closures assigned to binding in block Fix rust-lang#58497.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 7, 2023
…twco Detect closures assigned to binding in block Fix rust-lang#58497.
calebcartwright
pushed a commit
to calebcartwright/rust
that referenced
this issue
Jan 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
(playground) main error message is:
I spent a long time trying to figure out where I was creating a reference until I finally figured out that
Copy
types are always captured by reference, even if you move them in the closure. It would be helpful if it mentioned the fact that while this looks like a move it's actually copying out of a reference because the type isCopy
.The text was updated successfully, but these errors were encountered: