-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Closure parameter inference and lifetime elision mayhem #24421
Labels
A-closures
Area: Closures (`|…| { … }`)
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.
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Needs a P- tag. |
triage: P-medium |
oh, sorry :) |
Looks like it was caused by the same "unexpected capture" issue as #38714 - it works on nightly. |
This still looks like a distinct "family of examples", so I'll at least like it to be added to the test for that issue. |
euclio
added a commit
to euclio/rust
that referenced
this issue
Oct 12, 2018
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-closures
Area: Closures (`|…| { … }`)
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.
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
If you throw the following code into playpen, in the fourth case (by my reading of the error message) Rust determines an incompatible number of lifetime parameters
for<'r> core::ops::Fn<(&'r u64, &'r u64)>
vs.for<'r,'r> core::ops::Fn<(&'r u64, &'r u64)>
).I won't try to explain how mysterious this was, manifesting as a "sorry, you don't implement that trait" error (because the closure was not matching the type) without explaining what was awry.
The text was updated successfully, but these errors were encountered: