Skip to content

Heap closures can capture already-moved values. #7619

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

Closed
bblum opened this issue Jul 6, 2013 · 1 comment
Closed

Heap closures can capture already-moved values. #7619

bblum opened this issue Jul 6, 2013 · 1 comment
Labels
A-type-system Area: Type system I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@bblum
Copy link
Contributor

bblum commented Jul 6, 2013

I must say I am shocked that this program is accepted. You can imagine what happens.

fn main () {
        let x = ~"hello";
        let _y = x;
        let z: ~fn() = || { error!("%?", x); }; // program accepted with @fn or ~fn but not &fn
        z();
}
@bblum
Copy link
Contributor Author

bblum commented Jul 6, 2013

dup of #7444

@bblum bblum closed this as completed Jul 6, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Sep 3, 2021
Update README.md

Capitalized proper noun.
changelog:none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

1 participant