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

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

Closed
alexcrichton opened this issue Nov 27, 2013 · 3 comments
Closed

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

alexcrichton opened this issue Nov 27, 2013 · 3 comments
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@alexcrichton
Copy link
Member

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

@nikomatsakis
Copy link
Contributor

Indeed. Seems like a bug.

@alexcrichton
Copy link
Member Author

This has been fixed, flagging as needstest.

@alexcrichton
Copy link
Member Author

Updated example:

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

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

flip1995 pushed a commit to flip1995/rust that referenced this issue May 20, 2023
fix [`invalid_regex`] not recognizing new syntax introduced after regex-1.8.0

fixes: rust-lang#10680

---

changelog: fix [`invalid_regex`] not recognizing new syntax introduced after regex-1.8.0

bump up `regex-syntax` dependency version to 0.7.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants