-
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
Point at variable moved by closure #41523
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Awesome! :D |
Travis failed:
|
| | ||
61 | foo(f); | ||
68 | let mut f = |g: Box<FnMut(isize)>, b: isize| {}; | ||
| ----- moved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these the latest outputs? if so, I can't really understand what this "moved" annotation is trying to tell me =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be a better text for the span? I'm considering captured outer variable
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see what it means. Well, that would certainly be clearer. Maybe "declaration of captured variable"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or "moved variable")?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Changed to "captured outer variable" to keep the same wording as the main label (it might help ESLs be less lost with it).
@bors r+ rollup |
📌 Commit 1ca1483 has been approved by |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 1ca1483 has been approved by |
Point at variable moved by closure Fix rust-lang#41482, rust-lang#31752.
Point at variable moved by closure Fix rust-lang#41482, rust-lang#31752.
Point at variable moved by closure Fix rust-lang#41482, rust-lang#31752.
This has been an annoying error message for quite some time. thanks @estebank |
Fix #41482, #31752.