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

NLL: Add closure cannot be moved note. #57099

Merged
merged 1 commit into from Jan 5, 2019

Conversation

Projects
None yet
5 participants
@davidtwco
Copy link
Member

davidtwco commented Dec 24, 2018

Fixes #57098.

This PR extends existing logic for checking whether a closure that
is FnOnce and therefore moves variables that it captures from the
environment has already been invoked when being invoked again.

Now, this logic will also check whether the closure is being moved after
previously being moved or invoked and add an appropriate note.

r? @pnkfelix

Add closure cannot be moved note.
This commit extends existing logic for checking whether a closure that
is `FnOnce` and therefore moves variables that it captures from the
environment has already been invoked when being invoked again.

Now, this logic will also check whether the closure is being moved after
previously being moved or invoked and add an appropriate note.

@davidtwco davidtwco force-pushed the davidtwco:issue-57098 branch from a815e46 to fcad209 Dec 26, 2018

@davidtwco

This comment has been minimized.

Copy link
Member

davidtwco commented Dec 30, 2018

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 2, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 2, 2019

📌 Commit fcad209 has been approved by nikomatsakis

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jan 3, 2019

Rollup merge of rust-lang#57099 - davidtwco:issue-57098, r=nikomatsakis
NLL: Add closure cannot be moved note.

Fixes rust-lang#57098.

This PR extends existing logic for checking whether a closure that
is `FnOnce` and therefore moves variables that it captures from the
environment has already been invoked when being invoked again.

Now, this logic will also check whether the closure is being moved after
previously being moved or invoked and add an appropriate note.

r? @pnkfelix
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 5, 2019

⌛️ Testing commit fcad209 with merge cae623c...

bors added a commit that referenced this pull request Jan 5, 2019

Auto merge of #57099 - davidtwco:issue-57098, r=nikomatsakis
NLL: Add closure cannot be moved note.

Fixes #57098.

This PR extends existing logic for checking whether a closure that
is `FnOnce` and therefore moves variables that it captures from the
environment has already been invoked when being invoked again.

Now, this logic will also check whether the closure is being moved after
previously being moved or invoked and add an appropriate note.

r? @pnkfelix
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 5, 2019

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing cae623c to master...

@bors bors merged commit fcad209 into rust-lang:master Jan 5, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@davidtwco davidtwco deleted the davidtwco:issue-57098 branch Jan 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment