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

A proc can be called twice when captured in a proc #12127

Closed
huonw opened this issue Feb 9, 2014 · 3 comments · Fixed by #13413
Closed

A proc can be called twice when captured in a proc #12127

huonw opened this issue Feb 9, 2014 · 3 comments · Fixed by #13413
Labels
A-typesystem Area: The type system
Milestone

Comments

@huonw
Copy link
Member

huonw commented Feb 9, 2014

fn main() {
    let a = ~"foo";
    let f = proc() { println!("{}", a); drop(a) };
    (proc() {
        f();
        f();
    })()
}

understandably crashes on the second f call.

Seems similar to #12041 (although no loop required), and #10398.

@alexcrichton
Copy link
Member

Nominating.

@flaper87
Copy link
Contributor

cc @flaper87

@pnkfelix
Copy link
Member

Assigning 1.0, P-backcompat-lang.

@pnkfelix pnkfelix added this to the 1.0 milestone Mar 13, 2014
bors added a commit that referenced this issue Apr 10, 2014
This fixes the categorization of the upvars of procs (represented internally
as once fns) to consider usage to require a loan. In doing so, upvars are no
longer allowed to be moved out of repeatedly in loops and such.

Closes #10398
Closes #12041
Closes #12127
bors added a commit to rust-lang-ci/rust that referenced this issue Jul 25, 2022
Update GitHub Actions actions/checkout@v2 to v3

The v2 implementation uses Node 12, which is end-of-life on April 30, 2022. See https://nodejs.org/en/about/releases/. Update to v3, which is based on Node 16 whose support lasts until April 30, 2024.

They made this a major version change (v2 to v3) because old GitHub Enterprise versions aren't necessarily compatible with Node 16, but for github.com-supplied runners (SaaS) there is no practical difference.
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 11, 2024
…eviewer_rotation, r=flip1995

Remove giraffate from the reviewer rotation

I've been less active in Clippy recently because I'm so busy that I don't have time for maintaining Clippy in my spare time. So, I remove myself from the reviewer rotation once. I hope to come back again.

I'll reassign the PRs later.

changelog: none
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants