-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Returning upvar captured by mutable reference doesn't work #40510
Labels
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Comments
This also gives a confusing error: fn main() {
let mut a = Vec::<bool>::new();
|| {
|| {
a.push(true)
}
};
}
The following works: fn main() {
let a = Vec::<bool>::new();
|| {
|| {
a.len()
}
};
} |
None of these examples don't compile today, so I'm presuming this is fixed and marking E-needstest. |
Can I take this issue and put this into a run-pass test? |
Sounds good to me, though compile-pass would probably be sufficient - grep for |
Ok. Will do. Btw, it looks like this commit was fixed by 9809fe0. |
dsprenkels
pushed a commit
to dsprenkels/rust
that referenced
this issue
Aug 2, 2017
dsprenkels
pushed a commit
to dsprenkels/rust
that referenced
this issue
Aug 3, 2017
23 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
This works:
This does not and gives a confusing error:
The error:
The text was updated successfully, but these errors were encountered: