Skip to content

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

Closed

Description

@huonw
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.

Activity

  1. alexcrichton commented on Mar 1, 2014

    @alexcrichton
    Member

    Nominating.

  2. flaper87 commented on Mar 12, 2014

    @flaper87
    Contributor
  3. pnkfelix commented on Mar 13, 2014

    @pnkfelix
    Contributor

    Assigning 1.0, P-backcompat-lang.

  4. added this to the 1.0 milestone on Mar 13, 2014
  5. added a commit that references this issue on Apr 9, 2014
    767ed1a
  6. added a commit that references this issue on Apr 10, 2014
    7fbcb40
  7. added a commit that references this issue on Jul 25, 2022
  8. added a commit that references this issue on Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-system

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions