Skip to content
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

Reference: Mention move keyword for lambdas #36929

Merged
merged 1 commit into from
Oct 7, 2016
Merged

Reference: Mention move keyword for lambdas #36929

merged 1 commit into from
Oct 7, 2016

Conversation

angelsl
Copy link
Contributor

@angelsl angelsl commented Oct 3, 2016

From issue #36683

@rust-highfive
Copy link
Collaborator

r? @Manishearth

(rust_highfive has picked a reviewer for you, use r? to override)

@steveklabnik
Copy link
Member

@bors: r+ rollup

thanks so much!

@bors
Copy link
Contributor

bors commented Oct 3, 2016

📌 Commit b00a8a3 has been approved by steveklabnik

@angelsl
Copy link
Contributor Author

angelsl commented Oct 3, 2016

I realise the example is rather trivial and doesn't actually require move there...

But I can't think of one that isn't overly complex — I guess there isn't such an example, because to even need move the closure has to live longer than the values it captures i.e. the closure needs to be boxed and stored somewhere else.

@steveklabnik
Copy link
Member

steveklabnik commented Oct 3, 2016 via email

@frewsxcv
Copy link
Member

frewsxcv commented Oct 4, 2016

From Travis CI:

failures:

---- Statements_and_expressions_16 stdout ----
    error[E0425]: unresolved name `ten_times`
 --> <anon>:3:1
  |
3 | ten_times(move |j| println!("{}, {}", word, j));
  | ^^^^^^^^^ unresolved name

error: aborting due to previous error(s)

thread 'Statements_and_expressions_16' panicked at 'Box<Any>', src/librustc/session/mod.rs:185
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    Statements_and_expressions_16

test result: FAILED. 94 passed; 1 failed; 18 ignored; 0 measured

@angelsl
Copy link
Contributor Author

angelsl commented Oct 4, 2016

Right, I forgot docs are tested and context doesn't carry over. Oops.

On 4 Oct 2016 10:45 AM, "Corey Farwell" notifications@github.com wrote:

From Travis CI:

failures:

---- Statements_and_expressions_16 stdout ----
error[E0425]: unresolved name ten_times
--> :3:1
|
3 | ten_times(move |j| println!("{}, {}", word, j));
| ^^^^^^^^^ unresolved name

error: aborting due to previous error(s)

thread 'Statements_and_expressions_16' panicked at 'Box', src/librustc/session/mod.rs:185
note: Run with RUST_BACKTRACE=1 for a backtrace.

failures:
Statements_and_expressions_16

test result: FAILED. 94 passed; 1 failed; 18 ignored; 0 measured


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#36929 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAOXqPPaz4QowRN4_7kFtI_ehPLcD8Paks5qwb2ogaJpZM4KMvKS
.

@sfackler
Copy link
Member

sfackler commented Oct 4, 2016

@bors r-

@angelsl
Copy link
Contributor Author

angelsl commented Oct 4, 2016

Alright, this should pass.

@steveklabnik steveklabnik self-assigned this Oct 4, 2016
@steveklabnik
Copy link
Member

@bors: r+ rollup

thank you!

@bors
Copy link
Contributor

bors commented Oct 6, 2016

📌 Commit 58190cc has been approved by steveklabnik

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Oct 7, 2016
Reference: Mention `move` keyword for lambdas

From issue rust-lang#36683
bors added a commit that referenced this pull request Oct 7, 2016
Rollup of 5 pull requests

- Successful merges: #36222, #36665, #36929, #37003, #37008
- Failed merges:
@bors bors merged commit 58190cc into rust-lang:master Oct 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants