-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Parentheses notation should respect lifetime elision #18992
Labels
P-medium
Medium priority
Comments
Nominating. |
@alexcrichton notes that this can be fixed backwards compatibly, and @nikomatsakis agrees. P-high, not 1.0. |
Well, sort of -- I mean lifetime elision broke code, but almost only bad code. The problem is that people can use |
huonw
added a commit
to huonw/rust
that referenced
this issue
Dec 6, 2014
This means that `Fn(&A) -> (&B, &C)` is equivalent to `for<'a> Fn(&'a A) -> (&'a B, &'a C)` similar to the lifetime elision of lower-case `fn` in types and declarations. Closes rust-lang#18992.
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
Dec 9, 2014
This means that `Fn(&A) -> (&B, &C)` is equivalent to `for<'a> Fn(&'a A) -> (&'a B, &'a C)` similar to the lifetime elision of lower-case `fn` in types and declarations. Closes rust-lang#18992.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HRTB doesn't correctly implement lifetime elision for
Fn()
notation. See the testsrc/test/compile-fail/unboxed-closure-sugar-equiv.rs
.The text was updated successfully, but these errors were encountered: