Use impl_header_lifetime_elision in libcore#54687
Merged
bors merged 3 commits intorust-lang:masterfrom Oct 3, 2018
Merged
Conversation
Contributor
|
r? @dtolnay (rust_highfive has picked a reviewer for you, use r? to override) |
dtolnay
reviewed
Sep 30, 2018
| | | ||
| = note: conflicting implementation in crate `core`: | ||
| - impl<'a, T> std::marker::Copy for &'a T | ||
| - impl<'_, T> std::marker::Copy for &T |
Member
There was a problem hiding this comment.
This line is not valid syntax. I filed #54690 to follow up.
Member
|
@bors r+ |
Collaborator
|
📌 Commit 8d6bee3 has been approved by |
This comment has been minimized.
This comment has been minimized.
Member
Author
|
@dtolnay I needed to add a commit to fix the libcore test build; please re-r+ |
Member
|
Looks good! @bors r+ |
Collaborator
|
📌 Commit d4840da has been approved by |
Collaborator
|
⌛ Testing commit d4840da with merge 5ed5b3bcb5610cf0712466f4887142bb62c4ebbd... |
Collaborator
|
💔 Test failed - status-appveyor |
Member
Author
|
3hr timeout on appveyor: https://ci.appveyor.com/project/rust-lang/rust/build/1.0.9185 Can I get a retry, please? |
Member
|
@bors retry |
emilyalbini
added a commit
to emilyalbini/rust
that referenced
this pull request
Oct 2, 2018
Use impl_header_lifetime_elision in libcore The feature is approved for stabilization, so let's use it to remove about 300 `'a`s. Tracking issue for the feature: rust-lang#15872
emilyalbini
added a commit
to emilyalbini/rust
that referenced
this pull request
Oct 2, 2018
Use impl_header_lifetime_elision in libcore The feature is approved for stabilization, so let's use it to remove about 300 `'a`s. Tracking issue for the feature: rust-lang#15872
bors
added a commit
that referenced
this pull request
Oct 2, 2018
Rollup of 10 pull requests Successful merges: - #54269 (#53840: Consolidate pattern check errors) - #54458 (Allow both explicit and elided lifetimes in the same impl header) - #54603 (Add `crate::` to trait suggestions in Rust 2018.) - #54648 (Update Cargo's submodule) - #54680 (make run-pass tests with empty main just compile-pass tests) - #54687 (Use impl_header_lifetime_elision in libcore) - #54699 (Re-export `getopts` so custom drivers can reference it.) - #54702 (do not promote comparing function pointers) - #54728 (Renumber `proc_macro` tracking issues) - #54745 (make `CStr::from_bytes_with_nul_unchecked()` a const fn) Failed merges: r? @ghost
This was referenced Oct 3, 2018
bors
added a commit
that referenced
this pull request
Oct 23, 2018
Stabilize impl_header_lifetime_elision in 2015 ~~This is currently blocked on #54902; it should be good after that~~ It's already stable in 2018; this finishes the stabilization. FCP completed (#15872 (comment)), proposal (#15872 (comment)). Tracking issue: #15872 Usage examples (from libcore): #54687
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Feb 20, 2019
Use more impl header lifetime elision Inspired by seeing explicit lifetimes on these two: - https://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#impl-FusedIterator - https://doc.rust-lang.org/nightly/std/primitive.u32.html#impl-Not And a follow-up to rust-lang#54687, that started using IHLE in libcore. Most of the changes in here fall into two big categories: - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop`, `Debug`, and `Clone`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations [where the flipped one cannot elide the lifetime](https://internals.rust-lang.org/t/impl-type-parameter-aliases/9403/2?u=scottmcm). I also removed two lifetimes that turned out to be completely unused; see rust-lang#41960 (comment)
cuviper
pushed a commit
to cuviper/rayon-hash
that referenced
this pull request
Apr 25, 2019
Use more impl header lifetime elision Inspired by seeing explicit lifetimes on these two: - https://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#impl-FusedIterator - https://doc.rust-lang.org/nightly/std/primitive.u32.html#impl-Not And a follow-up to rust-lang/rust#54687, that started using IHLE in libcore. Most of the changes in here fall into two big categories: - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop`, `Debug`, and `Clone`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations [where the flipped one cannot elide the lifetime](https://internals.rust-lang.org/t/impl-type-parameter-aliases/9403/2?u=scottmcm). I also removed two lifetimes that turned out to be completely unused; see rust-lang/rust#41960 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The feature is approved for stabilization, so let's use it to remove about 300
'as.Tracking issue for the feature: #15872