about summary refs log tree commit diff
path: root/src/libcore/ops
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-10-02 22:54:33 +0200
committerGitHub <noreply@github.com>2018-10-02 22:54:33 +0200
commit7e571eead8e4356dcb9b4f4aa92ffcdc29336803 (patch)
tree49c4d78de9ae26b8957c5be8f15668b4fafbf3e7 /src/libcore/ops
parent32c1454a87e22431e79d189eaac6b89747460b50 (diff)
parentd4840da77993d052bae2a900163026602ac89d3c (diff)
downloadrust-7e571eead8e4356dcb9b4f4aa92ffcdc29336803.tar.gz
rust-7e571eead8e4356dcb9b4f4aa92ffcdc29336803.zip
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
Diffstat (limited to 'src/libcore/ops')
-rw-r--r--src/libcore/ops/deref.rs6
-rw-r--r--src/libcore/ops/function.rs10
-rw-r--r--src/libcore/ops/generator.rs2
-rw-r--r--src/libcore/ops/range.rs10
4 files changed, 14 insertions, 14 deletions
diff --git a/src/libcore/ops/deref.rs b/src/libcore/ops/deref.rs
index 54eecc82e19..91a3d77e8b2 100644
--- a/src/libcore/ops/deref.rs
+++ b/src/libcore/ops/deref.rs
@@ -83,14 +83,14 @@ pub trait Deref {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T: ?Sized> Deref for &'a T {
+impl<T: ?Sized> Deref for &T {
     type Target = T;
 
     fn deref(&self) -> &T { *self }
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T: ?Sized> Deref for &'a mut T {
+impl<T: ?Sized> Deref for &mut T {
     type Target = T;
 
     fn deref(&self) -> &T { *self }
@@ -174,6 +174,6 @@ pub trait DerefMut: Deref {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T: ?Sized> DerefMut for &'a mut T {
+impl<T: ?Sized> DerefMut for &mut T {
     fn deref_mut(&mut self) -> &mut T { *self }
 }
diff --git a/src/libcore/ops/function.rs b/src/libcore/ops/function.rs
index 3ebd10a9209..c9591c3f57b 100644
--- a/src/libcore/ops/function.rs
+++ b/src/libcore/ops/function.rs
@@ -240,7 +240,7 @@ pub trait FnOnce<Args> {
 
 mod impls {
     #[stable(feature = "rust1", since = "1.0.0")]
-    impl<'a,A,F:?Sized> Fn<A> for &'a F
+    impl<A,F:?Sized> Fn<A> for &F
         where F : Fn<A>
     {
         extern "rust-call" fn call(&self, args: A) -> F::Output {
@@ -249,7 +249,7 @@ mod impls {
     }
 
     #[stable(feature = "rust1", since = "1.0.0")]
-    impl<'a,A,F:?Sized> FnMut<A> for &'a F
+    impl<A,F:?Sized> FnMut<A> for &F
         where F : Fn<A>
     {
         extern "rust-call" fn call_mut(&mut self, args: A) -> F::Output {
@@ -258,7 +258,7 @@ mod impls {
     }
 
     #[stable(feature = "rust1", since = "1.0.0")]
-    impl<'a,A,F:?Sized> FnOnce<A> for &'a F
+    impl<A,F:?Sized> FnOnce<A> for &F
         where F : Fn<A>
     {
         type Output = F::Output;
@@ -269,7 +269,7 @@ mod impls {
     }
 
     #[stable(feature = "rust1", since = "1.0.0")]
-    impl<'a,A,F:?Sized> FnMut<A> for &'a mut F
+    impl<A,F:?Sized> FnMut<A> for &mut F
         where F : FnMut<A>
     {
         extern "rust-call" fn call_mut(&mut self, args: A) -> F::Output {
@@ -278,7 +278,7 @@ mod impls {
     }
 
     #[stable(feature = "rust1", since = "1.0.0")]
-    impl<'a,A,F:?Sized> FnOnce<A> for &'a mut F
+    impl<A,F:?Sized> FnOnce<A> for &mut F
         where F : FnMut<A>
     {
         type Output = F::Output;
diff --git a/src/libcore/ops/generator.rs b/src/libcore/ops/generator.rs
index 4b70c5398be..297089926b5 100644
--- a/src/libcore/ops/generator.rs
+++ b/src/libcore/ops/generator.rs
@@ -124,7 +124,7 @@ pub trait Generator {
 }
 
 #[unstable(feature = "generator_trait", issue = "43122")]
-impl<'a, T> Generator for &'a mut T
+impl<T> Generator for &mut T
     where T: Generator + ?Sized
 {
     type Yield = T::Yield;
diff --git a/src/libcore/ops/range.rs b/src/libcore/ops/range.rs
index 9c635678d7a..f7e5a89a7aa 100644
--- a/src/libcore/ops/range.rs
+++ b/src/libcore/ops/range.rs
@@ -851,7 +851,7 @@ impl<'a, T: ?Sized + 'a> RangeBounds<T> for (Bound<&'a T>, Bound<&'a T>) {
 }
 
 #[stable(feature = "collections_range", since = "1.28.0")]
-impl<'a, T> RangeBounds<T> for RangeFrom<&'a T> {
+impl<T> RangeBounds<T> for RangeFrom<&T> {
     fn start_bound(&self) -> Bound<&T> {
         Included(self.start)
     }
@@ -861,7 +861,7 @@ impl<'a, T> RangeBounds<T> for RangeFrom<&'a T> {
 }
 
 #[stable(feature = "collections_range", since = "1.28.0")]
-impl<'a, T> RangeBounds<T> for RangeTo<&'a T> {
+impl<T> RangeBounds<T> for RangeTo<&T> {
     fn start_bound(&self) -> Bound<&T> {
         Unbounded
     }
@@ -871,7 +871,7 @@ impl<'a, T> RangeBounds<T> for RangeTo<&'a T> {
 }
 
 #[stable(feature = "collections_range", since = "1.28.0")]
-impl<'a, T> RangeBounds<T> for Range<&'a T> {
+impl<T> RangeBounds<T> for Range<&T> {
     fn start_bound(&self) -> Bound<&T> {
         Included(self.start)
     }
@@ -881,7 +881,7 @@ impl<'a, T> RangeBounds<T> for Range<&'a T> {
 }
 
 #[stable(feature = "collections_range", since = "1.28.0")]
-impl<'a, T> RangeBounds<T> for RangeInclusive<&'a T> {
+impl<T> RangeBounds<T> for RangeInclusive<&T> {
     fn start_bound(&self) -> Bound<&T> {
         Included(self.start)
     }
@@ -891,7 +891,7 @@ impl<'a, T> RangeBounds<T> for RangeInclusive<&'a T> {
 }
 
 #[stable(feature = "collections_range", since = "1.28.0")]
-impl<'a, T> RangeBounds<T> for RangeToInclusive<&'a T> {
+impl<T> RangeBounds<T> for RangeToInclusive<&T> {
     fn start_bound(&self) -> Bound<&T> {
         Unbounded
     }