Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Feb 21, 2019

Don't warn about an argument that is moved into a closure.

ExprUseVisitor doesn't walk into nested bodies so use a new
visitor that collects the variables that are moved into closures.

Fixes #3739

Don't warn about an argument that is moved into a closure.

ExprUseVisitor doesn't walk into nested bodies so use a new
visitor that collects the variables that are moved into closures.

Fixes #3739
@oli-obk
Copy link
Contributor

oli-obk commented Feb 21, 2019

This seems like it could be a common issue with other uses of ExprUseVisitor. Should we try to generalize this (maybe by adjusting ExprUseVisitor?)

Use ExprUseVisitor correctly instead.
@ghost
Copy link
Author

ghost commented Feb 22, 2019

I was wrong about ExprUseVisitor. The problem was actually in the consume callback.

@flip1995 flip1995 added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 24, 2019
@bors
Copy link
Contributor

bors commented Mar 11, 2019

☔ The latest upstream changes (presumably #3767) made this pull request unmergeable. Please resolve the merge conflicts.

@phansch
Copy link
Contributor

phansch commented Mar 12, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Mar 12, 2019

📌 Commit 6937d55 has been approved by phansch

bors added a commit that referenced this pull request Mar 12, 2019
Fix `boxed_local` suggestion

Don't warn about an argument that is moved into a closure.

ExprUseVisitor doesn't walk into nested bodies so use a new
visitor that collects the variables that are moved into closures.

Fixes #3739
@bors
Copy link
Contributor

bors commented Mar 12, 2019

⌛ Testing commit 6937d55 with merge 3d31c21...

@bors
Copy link
Contributor

bors commented Mar 12, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: phansch
Pushing 3d31c21 to master...

@bors bors merged commit 6937d55 into rust-lang:master Mar 12, 2019
@ghost ghost deleted the fix-3739 branch May 11, 2019 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants