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

Can't spawn a temporary closure #922

Closed
brson opened this issue Sep 14, 2011 · 1 comment

Comments

@brson
Copy link
Contributor

commented Sep 14, 2011

This doesn't valgrind:

fn f() {
}

fn main() {
    task::spawn(bind f());
}

This does:

fn f() {
}

fn main() {
    let g = f;
    task::spawn(g);
}
@brson

This comment has been minimized.

Copy link
Contributor Author

commented Sep 15, 2011

This is actually about re-moving temporary closures. Reduced test case:

fn f2(-thing: fn()) { }

fn f(-thing: fn()) { f2(thing); }

fn main() {
    f(fn(){});
}

@brson brson closed this in 107f129 Sep 20, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.