Rollup merge of #54687 - scottmcm:more-elision, r=dtolnay

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: https://github.com/rust-lang/rust/issues/15872
This commit is contained in:
Pietro Albini 2018-10-02 22:54:33 +02:00 committed by GitHub
commit 7e571eead8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 153 additions and 151 deletions

View file

@ -14,7 +14,7 @@ LL | impl Copy for &'static NotSync {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<'a, T> std::marker::Copy for &'a T
- impl<'_, T> std::marker::Copy for &T
where T: ?Sized;
error[E0119]: conflicting implementations of trait `std::marker::Copy` for type `&[NotSync]`:
@ -24,7 +24,7 @@ LL | impl Copy for &'static [NotSync] {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<'a, T> std::marker::Copy for &'a T
- impl<'_, T> std::marker::Copy for &T
where T: ?Sized;
error[E0206]: the trait `Copy` may not be implemented for this type

View file

@ -5,7 +5,7 @@ LL | impl<Foo> Deref for Foo { } //~ ERROR must be used
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: conflicting implementation in crate `core`:
- impl<'a, T> std::ops::Deref for &'a T
- impl<'_, T> std::ops::Deref for &T
where T: ?Sized;
error[E0210]: type parameter `Foo` must be used as the type parameter for some local type (e.g. `MyStruct<Foo>`)