-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
arbitrary_self_types don't support lifetime elision #52675
Labels
A-lifetimes
Area: Lifetimes / regions
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Nemo157
changed the title
arbitrary_self_types break lifetime elision
arbitrary_self_types don't support lifetime elision
Jul 24, 2018
jonas-schievink
added
A-lifetimes
Area: Lifetimes / regions
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
C-bug
Category: This is a bug.
labels
Jan 27, 2019
Any progress on that? I need this feature in Servo and the absence of lifetime elision is a huge papercut. |
This also interacts with the just added suggestion in #58919, the suggested fix won't work: impl Foo {
fn c(self: Bar<'_>) -> impl std::fmt::Debug {
self
}
} suggests adding
|
bors
added a commit
that referenced
this issue
May 20, 2019
… r=<try> Allow lifetime elision in arbitrary_self_types Currently, `self` except `&Self` and `&mut Self` is skipped. By this, other `self`s with lifetime is also ignored. This PR changes it to only skip `Self`, `&Self` and `&mut Self`, and to handle other `self`s like normal arguments. Closes #52675
bors
added a commit
that referenced
this issue
May 28, 2019
…2, r=<try> Allow lifetime elision in `Pin<&(mut) Self>` This replaces #60944. ~~This PR changes elision rules to apply `self: &(mut) Self` elision rules even if nested in `Pin`.~~ This PR changes `self: &(mut) S` elision rules to instead visit the type of `self` and look for `&(mut) S` (where `is_self_ty(S)`) within it Closes #52675 r? @eddyb cc @cramertj @Centril @withoutboats @scottmcm
Centril
added a commit
to Centril/rust
that referenced
this issue
Jul 26, 2019
…me-elision-2, r=Centril Allow lifetime elision in `Pin<&(mut) Self>` This PR changes `self: &(mut) S` elision rules to instead visit the type of `self` and look for `&(mut) S` (where `is_self_ty(S)`) within it Replaces rust-lang#60944 Closes rust-lang#52675 r? @eddyb cc @cramertj @Centril @withoutboats @scottmcm
Centril
added a commit
to Centril/rust
that referenced
this issue
Jul 27, 2019
…me-elision-2, r=Centril Allow lifetime elision in `Pin<&(mut) Self>` This PR changes `self: &(mut) S` elision rules to instead visit the type of `self` and look for `&(mut) S` (where `is_self_ty(S)`) within it Replaces rust-lang#60944 Closes rust-lang#52675 r? @eddyb cc @cramertj @Centril @withoutboats @scottmcm
Centril
added a commit
to Centril/rust
that referenced
this issue
Jul 27, 2019
…me-elision-2, r=Centril Allow lifetime elision in `Pin<&(mut) Self>` This PR changes `self: &(mut) S` elision rules to instead visit the type of `self` and look for `&(mut) S` (where `is_self_ty(S)`) within it Replaces rust-lang#60944 Closes rust-lang#52675 r? @eddyb cc @cramertj @Centril @withoutboats @scottmcm
Centril
added a commit
to Centril/rust
that referenced
this issue
Jul 28, 2019
…me-elision-2, r=Centril Allow lifetime elision in `Pin<&(mut) Self>` This PR changes `self: &(mut) S` elision rules to instead visit the type of `self` and look for `&(mut) S` (where `is_self_ty(S)`) within it Replaces rust-lang#60944 Closes rust-lang#52675 r? @eddyb cc @cramertj @Centril @withoutboats @scottmcm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-lifetimes
Area: Lifetimes / regions
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I mentioned this on the RFC recently, but since this is being hit by
futures
0.3 I thought it's worth having an issue for the current implementation in case it's an easy fix.(playground)
The text was updated successfully, but these errors were encountered: