Skip to content

Nested proc usage can't use outer owned data #10682

Closed
@alexcrichton

Description

@alexcrichton

I would expect this code to compile:

fn work(_: ~int) {}
fn foo(_: proc()) {}

fn main() {
  let a = ~1;
  do foo { do foo { work(a) } }
}

cc @nikomatsakis, @pcwalton

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions