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

allow mutation of moved upvars #2152

Closed
nikomatsakis opened this issue Apr 7, 2012 · 6 comments
Closed

allow mutation of moved upvars #2152

nikomatsakis opened this issue Apr 7, 2012 · 6 comments
Assignees
Labels
A-typesystem Area: The type system C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@nikomatsakis
Copy link
Contributor

Something like this should work:

fn foo() {
    let mut x = [mut ...];
    task::spawn(fn~[move x]() {
        x += [3];
    }):
}
@brson
Copy link
Contributor

brson commented Apr 9, 2012

Also when the move is done implicitly by last use? This seems right, but I can't recall ever running up against it.

@nikomatsakis
Copy link
Contributor Author

I guess?

@ghost ghost assigned nikomatsakis Apr 12, 2012
@graydon
Copy link
Contributor

graydon commented May 30, 2013

blocked on resolution of #6308

@nikomatsakis
Copy link
Contributor Author

The syntax and particulars of this example do not relate,
but it would still be useful to be able to have mutable upvars.
Though if we remove copying closures it will not be relevant.

@emberian
Copy link
Member

emberian commented Aug 5, 2013

Visiting for triage; nothing to add

@catamorphism
Copy link
Contributor

Obsolete given current plans for closures

bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
rustup

On macOS the timing tests [failed again](https://github.com/rust-lang/miri/runs/6557930217?check_suite_focus=true), so let's give them even more slack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typesystem Area: The type system C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

5 participants