]> git.lizzy.rs Git - rust.git/commitdiff
liballoc: elide some lifetimes.
authorMazdak Farrokhzad <twingoow@gmail.com>
Sat, 2 Feb 2019 11:23:15 +0000 (12:23 +0100)
committerMazdak Farrokhzad <twingoow@gmail.com>
Sat, 2 Feb 2019 11:23:15 +0000 (12:23 +0100)
12 files changed:
src/liballoc/borrow.rs
src/liballoc/boxed.rs
src/liballoc/collections/binary_heap.rs
src/liballoc/collections/btree/map.rs
src/liballoc/collections/btree/set.rs
src/liballoc/collections/linked_list.rs
src/liballoc/collections/vec_deque.rs
src/liballoc/string.rs
src/liballoc/sync.rs
src/liballoc/tests/vec.rs
src/liballoc/tests/vec_deque.rs
src/liballoc/vec.rs

index c1696005373a0c1690b0dec4399be61054e9b671..816cdbc9ce6734b643def6eaed0df836ac910bc8 100644 (file)
@@ -183,9 +183,7 @@ pub enum Cow<'a, B: ?Sized + 'a>
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, B: ?Sized> Clone for Cow<'a, B>
-    where B: ToOwned
-{
+impl<'a, B: ?Sized + ToOwned> Clone for Cow<'a, B> {
     fn clone(&self) -> Cow<'a, B> {
         match *self {
             Borrowed(b) => Borrowed(b),
@@ -208,9 +206,7 @@ fn clone_from(&mut self, source: &Cow<'a, B>) {
     }
 }
 
-impl<'a, B: ?Sized> Cow<'a, B>
-    where B: ToOwned
-{
+impl<B: ?Sized + ToOwned> Cow<'_, B> {
     /// Acquires a mutable reference to the owned form of the data.
     ///
     /// Clones the data if it is not already owned.
@@ -286,9 +282,7 @@ pub fn into_owned(self) -> <B as ToOwned>::Owned {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, B: ?Sized> Deref for Cow<'a, B>
-    where B: ToOwned
-{
+impl<B: ?Sized + ToOwned> Deref for Cow<'_, B> {
     type Target = B;
 
     fn deref(&self) -> &B {
@@ -300,7 +294,7 @@ fn deref(&self) -> &B {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, B: ?Sized> Eq for Cow<'a, B> where B: Eq + ToOwned {}
+impl<B: ?Sized> Eq for Cow<'_, B> where B: Eq + ToOwned {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, B: ?Sized> Ord for Cow<'a, B>
@@ -334,7 +328,7 @@ fn partial_cmp(&self, other: &Cow<'a, B>) -> Option<Ordering> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, B: ?Sized> fmt::Debug for Cow<'a, B>
+impl<B: ?Sized> fmt::Debug for Cow<'_, B>
     where B: fmt::Debug + ToOwned,
           <B as ToOwned>::Owned: fmt::Debug
 {
@@ -347,7 +341,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, B: ?Sized> fmt::Display for Cow<'a, B>
+impl<B: ?Sized> fmt::Display for Cow<'_, B>
     where B: fmt::Display + ToOwned,
           <B as ToOwned>::Owned: fmt::Display
 {
@@ -381,7 +375,7 @@ fn hash<H: Hasher>(&self, state: &mut H) {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T: ?Sized + ToOwned> AsRef<T> for Cow<'a, T> {
+impl<T: ?Sized + ToOwned> AsRef<T> for Cow<'_, T> {
     fn as_ref(&self) -> &T {
         self
     }
index f590b6488d9da04c380710974a3fb67c3755438e..6f6fff0a657d0abfd9361c2a1395b3c478a6e8cb 100644 (file)
@@ -739,7 +739,7 @@ fn call_box(self: Box<F>, args: A) -> F::Output {
 
 #[unstable(feature = "fnbox",
            reason = "will be deprecated if and when `Box<FnOnce>` becomes usable", issue = "28796")]
-impl<'a, A, R> FnOnce<A> for Box<dyn FnBox<A, Output = R> + 'a> {
+impl<A, R> FnOnce<A> for Box<dyn FnBox<A, Output = R> + '_> {
     type Output = R;
 
     extern "rust-call" fn call_once(self, args: A) -> R {
@@ -749,7 +749,7 @@ extern "rust-call" fn call_once(self, args: A) -> R {
 
 #[unstable(feature = "fnbox",
            reason = "will be deprecated if and when `Box<FnOnce>` becomes usable", issue = "28796")]
-impl<'a, A, R> FnOnce<A> for Box<dyn FnBox<A, Output = R> + Send + 'a> {
+impl<A, R> FnOnce<A> for Box<dyn FnBox<A, Output = R> + Send + '_> {
     type Output = R;
 
     extern "rust-call" fn call_once(self, args: A) -> R {
index 4a38f041636ef91530c32adaaad0f7433f7df567..43416e57591bcb18e3c0b3f8289f0bca96f4f040 100644 (file)
@@ -231,7 +231,7 @@ pub struct PeekMut<'a, T: 'a + Ord> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: Ord + fmt::Debug> fmt::Debug for PeekMut<'a, T> {
+impl<T: Ord + fmt::Debug> fmt::Debug for PeekMut<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("PeekMut")
          .field(&self.heap.data[0])
@@ -240,7 +240,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 }
 
 #[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
-impl<'a, T: Ord> Drop for PeekMut<'a, T> {
+impl<T: Ord> Drop for PeekMut<'_, T> {
     fn drop(&mut self) {
         if self.sift {
             self.heap.sift_down(0);
@@ -249,7 +249,7 @@ fn drop(&mut self) {
 }
 
 #[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
-impl<'a, T: Ord> Deref for PeekMut<'a, T> {
+impl<T: Ord> Deref for PeekMut<'_, T> {
     type Target = T;
     fn deref(&self) -> &T {
         &self.heap.data[0]
@@ -257,7 +257,7 @@ fn deref(&self) -> &T {
 }
 
 #[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
-impl<'a, T: Ord> DerefMut for PeekMut<'a, T> {
+impl<T: Ord> DerefMut for PeekMut<'_, T> {
     fn deref_mut(&mut self) -> &mut T {
         &mut self.heap.data[0]
     }
@@ -912,7 +912,7 @@ unsafe fn move_to(&mut self, index: usize) {
     }
 }
 
-impl<'a, T> Drop for Hole<'a, T> {
+impl<T> Drop for Hole<'_, T> {
     #[inline]
     fn drop(&mut self) {
         // fill the hole again
@@ -936,7 +936,7 @@ pub struct Iter<'a, T: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> {
+impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("Iter")
          .field(&self.iter.as_slice())
@@ -976,14 +976,14 @@ fn next_back(&mut self) -> Option<&'a T> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T> ExactSizeIterator for Iter<'a, T> {
+impl<T> ExactSizeIterator for Iter<'_, T> {
     fn is_empty(&self) -> bool {
         self.iter.is_empty()
     }
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T> FusedIterator for Iter<'a, T> {}
+impl<T> FusedIterator for Iter<'_, T> {}
 
 /// An owning iterator over the elements of a `BinaryHeap`.
 ///
@@ -1054,7 +1054,7 @@ pub struct Drain<'a, T: 'a> {
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a, T: 'a> Iterator for Drain<'a, T> {
+impl<T> Iterator for Drain<'_, T> {
     type Item = T;
 
     #[inline]
@@ -1069,7 +1069,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a, T: 'a> DoubleEndedIterator for Drain<'a, T> {
+impl<T> DoubleEndedIterator for Drain<'_, T> {
     #[inline]
     fn next_back(&mut self) -> Option<T> {
         self.iter.next_back()
@@ -1077,14 +1077,14 @@ fn next_back(&mut self) -> Option<T> {
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a, T: 'a> ExactSizeIterator for Drain<'a, T> {
+impl<T> ExactSizeIterator for Drain<'_, T> {
     fn is_empty(&self) -> bool {
         self.iter.is_empty()
     }
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T: 'a> FusedIterator for Drain<'a, T> {}
+impl<T> FusedIterator for Drain<'_, T> {}
 
 #[stable(feature = "binary_heap_extras_15", since = "1.5.0")]
 impl<T: Ord> From<Vec<T>> for BinaryHeap<T> {
index d0e35c557a4d00590431129305a63ee8cbb7d6c3..27f162b114736895213bf439730040c8258e6de7 100644 (file)
@@ -279,7 +279,7 @@ pub struct Iter<'a, K: 'a, V: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Iter<'a, K, V> {
+impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for Iter<'_, K, V> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_list().entries(self.clone()).finish()
     }
@@ -337,7 +337,7 @@ pub struct Keys<'a, K: 'a, V: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, K: 'a + fmt::Debug, V: 'a> fmt::Debug for Keys<'a, K, V> {
+impl<K: fmt::Debug, V> fmt::Debug for Keys<'_, K, V> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_list().entries(self.clone()).finish()
     }
@@ -356,7 +356,7 @@ pub struct Values<'a, K: 'a, V: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, K: 'a, V: 'a + fmt::Debug> fmt::Debug for Values<'a, K, V> {
+impl<K, V: fmt::Debug> fmt::Debug for Values<'_, K, V> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_list().entries(self.clone()).finish()
     }
@@ -389,7 +389,7 @@ pub struct Range<'a, K: 'a, V: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Range<'a, K, V> {
+impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for Range<'_, K, V> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_list().entries(self.clone()).finish()
     }
@@ -412,7 +412,7 @@ pub struct RangeMut<'a, K: 'a, V: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for RangeMut<'a, K, V> {
+impl<K: fmt::Debug, V: fmt::Debug> fmt::Debug for RangeMut<'_, K, V> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         let range = Range {
             front: self.front.reborrow(),
@@ -442,7 +442,7 @@ pub enum Entry<'a, K: 'a, V: 'a> {
 }
 
 #[stable(feature= "debug_btree_map", since = "1.12.0")]
-impl<'a, K: 'a + Debug + Ord, V: 'a + Debug> Debug for Entry<'a, K, V> {
+impl<K: Debug + Ord, V: Debug> Debug for Entry<'_, K, V> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         match *self {
             Vacant(ref v) => f.debug_tuple("Entry")
@@ -470,7 +470,7 @@ pub struct VacantEntry<'a, K: 'a, V: 'a> {
 }
 
 #[stable(feature= "debug_btree_map", since = "1.12.0")]
-impl<'a, K: 'a + Debug + Ord, V: 'a> Debug for VacantEntry<'a, K, V> {
+impl<K: Debug + Ord, V> Debug for VacantEntry<'_, K, V> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("VacantEntry")
          .field(self.key())
@@ -493,7 +493,7 @@ pub struct OccupiedEntry<'a, K: 'a, V: 'a> {
 }
 
 #[stable(feature= "debug_btree_map", since = "1.12.0")]
-impl<'a, K: 'a + Debug + Ord, V: 'a + Debug> Debug for OccupiedEntry<'a, K, V> {
+impl<K: Debug + Ord, V: Debug> Debug for OccupiedEntry<'_, K, V> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_struct("OccupiedEntry")
          .field("key", self.key())
@@ -1202,7 +1202,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, K, V> FusedIterator for Iter<'a, K, V> {}
+impl<K, V> FusedIterator for Iter<'_, K, V> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, K: 'a, V: 'a> DoubleEndedIterator for Iter<'a, K, V> {
@@ -1217,7 +1217,7 @@ fn next_back(&mut self) -> Option<(&'a K, &'a V)> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, K: 'a, V: 'a> ExactSizeIterator for Iter<'a, K, V> {
+impl<K, V> ExactSizeIterator for Iter<'_, K, V> {
     fn len(&self) -> usize {
         self.length
     }
@@ -1274,14 +1274,14 @@ fn next_back(&mut self) -> Option<(&'a K, &'a mut V)> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, K: 'a, V: 'a> ExactSizeIterator for IterMut<'a, K, V> {
+impl<K, V> ExactSizeIterator for IterMut<'_, K, V> {
     fn len(&self) -> usize {
         self.length
     }
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, K, V> FusedIterator for IterMut<'a, K, V> {}
+impl<K, V> FusedIterator for IterMut<'_, K, V> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<K, V> IntoIterator for BTreeMap<K, V> {
@@ -1437,14 +1437,14 @@ fn next_back(&mut self) -> Option<&'a K> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, K, V> ExactSizeIterator for Keys<'a, K, V> {
+impl<K, V> ExactSizeIterator for Keys<'_, K, V> {
     fn len(&self) -> usize {
         self.inner.len()
     }
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, K, V> FusedIterator for Keys<'a, K, V> {}
+impl<K, V> FusedIterator for Keys<'_, K, V> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, K, V> Clone for Keys<'a, K, V> {
@@ -1474,14 +1474,14 @@ fn next_back(&mut self) -> Option<&'a V> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, K, V> ExactSizeIterator for Values<'a, K, V> {
+impl<K, V> ExactSizeIterator for Values<'_, K, V> {
     fn len(&self) -> usize {
         self.inner.len()
     }
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, K, V> FusedIterator for Values<'a, K, V> {}
+impl<K, V> FusedIterator for Values<'_, K, V> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, K, V> Clone for Values<'a, K, V> {
@@ -1524,15 +1524,14 @@ fn next_back(&mut self) -> Option<&'a mut V> {
 }
 
 #[stable(feature = "map_values_mut", since = "1.10.0")]
-impl<'a, K, V> ExactSizeIterator for ValuesMut<'a, K, V> {
+impl<K, V> ExactSizeIterator for ValuesMut<'_, K, V> {
     fn len(&self) -> usize {
         self.inner.len()
     }
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, K, V> FusedIterator for ValuesMut<'a, K, V> {}
-
+impl<K, V> FusedIterator for ValuesMut<'_, K, V> {}
 
 impl<'a, K, V> Range<'a, K, V> {
     unsafe fn next_unchecked(&mut self) -> (&'a K, &'a V) {
@@ -1610,7 +1609,7 @@ unsafe fn next_back_unchecked(&mut self) -> (&'a K, &'a V) {
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, K, V> FusedIterator for Range<'a, K, V> {}
+impl<K, V> FusedIterator for Range<'_, K, V> {}
 
 #[stable(feature = "btree_range", since = "1.17.0")]
 impl<'a, K, V> Clone for Range<'a, K, V> {
@@ -1679,7 +1678,7 @@ fn next_back(&mut self) -> Option<(&'a K, &'a mut V)> {
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, K, V> FusedIterator for RangeMut<'a, K, V> {}
+impl<K, V> FusedIterator for RangeMut<'_, K, V> {}
 
 impl<'a, K, V> RangeMut<'a, K, V> {
     unsafe fn next_back_unchecked(&mut self) -> (&'a K, &'a mut V) {
@@ -1790,7 +1789,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, K: Ord, Q: ?Sized, V> Index<&'a Q> for BTreeMap<K, V>
+impl<K: Ord, Q: ?Sized, V> Index<&Q> for BTreeMap<K, V>
     where K: Borrow<Q>,
           Q: Ord
 {
index 9231d2e67cf8112bbf6eb882a2e6be708c12152b..9c50bd7e91866b5540d6fcdf4de52476bcba61d3 100644 (file)
@@ -79,7 +79,7 @@ pub struct Iter<'a, T: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> {
+impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("Iter")
          .field(&self.iter.clone())
@@ -127,7 +127,7 @@ pub struct Difference<'a, T: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: 'a + fmt::Debug> fmt::Debug for Difference<'a, T> {
+impl<T: fmt::Debug> fmt::Debug for Difference<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("Difference")
          .field(&self.a)
@@ -150,7 +150,7 @@ pub struct SymmetricDifference<'a, T: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: 'a + fmt::Debug> fmt::Debug for SymmetricDifference<'a, T> {
+impl<T: fmt::Debug> fmt::Debug for SymmetricDifference<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("SymmetricDifference")
          .field(&self.a)
@@ -173,7 +173,7 @@ pub struct Intersection<'a, T: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: 'a + fmt::Debug> fmt::Debug for Intersection<'a, T> {
+impl<T: fmt::Debug> fmt::Debug for Intersection<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("Intersection")
          .field(&self.a)
@@ -196,7 +196,7 @@ pub struct Union<'a, T: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: 'a + fmt::Debug> fmt::Debug for Union<'a, T> {
+impl<T: fmt::Debug> fmt::Debug for Union<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("Union")
          .field(&self.a)
@@ -812,7 +812,7 @@ fn default() -> BTreeSet<T> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, 'b, T: Ord + Clone> Sub<&'b BTreeSet<T>> for &'a BTreeSet<T> {
+impl<T: Ord + Clone> Sub<&BTreeSet<T>> for &BTreeSet<T> {
     type Output = BTreeSet<T>;
 
     /// Returns the difference of `self` and `rhs` as a new `BTreeSet<T>`.
@@ -835,7 +835,7 @@ fn sub(self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, 'b, T: Ord + Clone> BitXor<&'b BTreeSet<T>> for &'a BTreeSet<T> {
+impl<T: Ord + Clone> BitXor<&BTreeSet<T>> for &BTreeSet<T> {
     type Output = BTreeSet<T>;
 
     /// Returns the symmetric difference of `self` and `rhs` as a new `BTreeSet<T>`.
@@ -858,7 +858,7 @@ fn bitxor(self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, 'b, T: Ord + Clone> BitAnd<&'b BTreeSet<T>> for &'a BTreeSet<T> {
+impl<T: Ord + Clone> BitAnd<&BTreeSet<T>> for &BTreeSet<T> {
     type Output = BTreeSet<T>;
 
     /// Returns the intersection of `self` and `rhs` as a new `BTreeSet<T>`.
@@ -881,7 +881,7 @@ fn bitand(self, rhs: &BTreeSet<T>) -> BTreeSet<T> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, 'b, T: Ord + Clone> BitOr<&'b BTreeSet<T>> for &'a BTreeSet<T> {
+impl<T: Ord + Clone> BitOr<&BTreeSet<T>> for &BTreeSet<T> {
     type Output = BTreeSet<T>;
 
     /// Returns the union of `self` and `rhs` as a new `BTreeSet<T>`.
@@ -934,12 +934,12 @@ fn next_back(&mut self) -> Option<&'a T> {
     }
 }
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T> ExactSizeIterator for Iter<'a, T> {
+impl<T> ExactSizeIterator for Iter<'_, T> {
     fn len(&self) -> usize { self.iter.len() }
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T> FusedIterator for Iter<'a, T> {}
+impl<T> FusedIterator for Iter<'_, T> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<T> Iterator for IntoIter<T> {
@@ -990,7 +990,7 @@ fn next_back(&mut self) -> Option<&'a T> {
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T> FusedIterator for Range<'a, T> {}
+impl<T> FusedIterator for Range<'_, T> {}
 
 /// Compare `x` and `y`, but return `short` if x is None and `long` if y is None
 fn cmp_opt<T: Ord>(x: Option<&T>, y: Option<&T>, short: Ordering, long: Ordering) -> Ordering {
@@ -1037,7 +1037,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T: Ord> FusedIterator for Difference<'a, T> {}
+impl<T: Ord> FusedIterator for Difference<'_, T> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, T> Clone for SymmetricDifference<'a, T> {
@@ -1071,7 +1071,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T: Ord> FusedIterator for SymmetricDifference<'a, T> {}
+impl<T: Ord> FusedIterator for SymmetricDifference<'_, T> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, T> Clone for Intersection<'a, T> {
@@ -1109,7 +1109,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T: Ord> FusedIterator for Intersection<'a, T> {}
+impl<T: Ord> FusedIterator for Intersection<'_, T> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, T> Clone for Union<'a, T> {
@@ -1143,4 +1143,4 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T: Ord> FusedIterator for Union<'a, T> {}
+impl<T: Ord> FusedIterator for Union<'_, T> {}
index 8f72c6babaf35918af671c6fcaf948f46f365664..e2da0041b4a8d0a02c1ac73aecb1074cfbfd0b2a 100644 (file)
@@ -63,7 +63,7 @@ pub struct Iter<'a, T: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> {
+impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("Iter")
          .field(&self.len)
@@ -73,7 +73,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 
 // FIXME(#26925) Remove in favor of `#[derive(Clone)]`
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T> Clone for Iter<'a, T> {
+impl<T> Clone for Iter<'_, T> {
     fn clone(&self) -> Self {
         Iter { ..*self }
     }
@@ -95,7 +95,7 @@ pub struct IterMut<'a, T: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: 'a + fmt::Debug> fmt::Debug for IterMut<'a, T> {
+impl<T: fmt::Debug> fmt::Debug for IterMut<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("IterMut")
          .field(&self.list)
@@ -834,10 +834,10 @@ fn next_back(&mut self) -> Option<&'a T> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T> ExactSizeIterator for Iter<'a, T> {}
+impl<T> ExactSizeIterator for Iter<'_, T> {}
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T> FusedIterator for Iter<'a, T> {}
+impl<T> FusedIterator for Iter<'_, T> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<'a, T> Iterator for IterMut<'a, T> {
@@ -883,12 +883,12 @@ fn next_back(&mut self) -> Option<&'a mut T> {
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T> ExactSizeIterator for IterMut<'a, T> {}
+impl<T> ExactSizeIterator for IterMut<'_, T> {}
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T> FusedIterator for IterMut<'a, T> {}
+impl<T> FusedIterator for IterMut<'_, T> {}
 
-impl<'a, T> IterMut<'a, T> {
+impl<T> IterMut<'_, T> {
     /// Inserts the given element just after the element most recently returned by `.next()`.
     /// The inserted element does not appear in the iteration.
     ///
@@ -984,7 +984,7 @@ pub struct DrainFilter<'a, T: 'a, F: 'a>
 }
 
 #[unstable(feature = "drain_filter", reason = "recently added", issue = "43244")]
-impl<'a, T, F> Iterator for DrainFilter<'a, T, F>
+impl<T, F> Iterator for DrainFilter<'_, T, F>
     where F: FnMut(&mut T) -> bool,
 {
     type Item = T;
@@ -1011,7 +1011,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 }
 
 #[unstable(feature = "drain_filter", reason = "recently added", issue = "43244")]
-impl<'a, T, F> Drop for DrainFilter<'a, T, F>
+impl<T, F> Drop for DrainFilter<'_, T, F>
     where F: FnMut(&mut T) -> bool,
 {
     fn drop(&mut self) {
@@ -1020,7 +1020,7 @@ fn drop(&mut self) {
 }
 
 #[unstable(feature = "drain_filter", reason = "recently added", issue = "43244")]
-impl<'a, T: 'a + fmt::Debug, F> fmt::Debug for DrainFilter<'a, T, F>
+impl<T: fmt::Debug, F> fmt::Debug for DrainFilter<'_, T, F>
     where F: FnMut(&mut T) -> bool
 {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
index de78783983d7ce203b6808f5a12d37140a9ecffb..abfb83d4139e15382453dcfb8a6c1653c0f90388 100644 (file)
@@ -2086,7 +2086,7 @@ fn ring_slices(buf: Self, head: usize, tail: usize) -> (Self, Self) {
     }
 }
 
-impl<'a, T> RingSlices for &'a [T] {
+impl<T> RingSlices for &[T] {
     fn slice(self, from: usize, to: usize) -> Self {
         &self[from..to]
     }
@@ -2095,7 +2095,7 @@ fn split_at(self, i: usize) -> (Self, Self) {
     }
 }
 
-impl<'a, T> RingSlices for &'a mut [T] {
+impl<T> RingSlices for &mut [T] {
     fn slice(self, from: usize, to: usize) -> Self {
         &mut self[from..to]
     }
@@ -2126,7 +2126,7 @@ pub struct Iter<'a, T: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> {
+impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         let (front, back) = RingSlices::ring_slices(self.ring, self.head, self.tail);
         f.debug_tuple("Iter")
@@ -2206,14 +2206,14 @@ fn rfold<Acc, F>(self, mut accum: Acc, mut f: F) -> Acc
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T> ExactSizeIterator for Iter<'a, T> {
+impl<T> ExactSizeIterator for Iter<'_, T> {
     fn is_empty(&self) -> bool {
         self.head == self.tail
     }
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T> FusedIterator for Iter<'a, T> {}
+impl<T> FusedIterator for Iter<'_, T> {}
 
 
 /// A mutable iterator over the elements of a `VecDeque`.
@@ -2231,7 +2231,7 @@ pub struct IterMut<'a, T: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: 'a + fmt::Debug> fmt::Debug for IterMut<'a, T> {
+impl<'a, T: fmt::Debug> fmt::Debug for IterMut<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         let (front, back) = RingSlices::ring_slices(&*self.ring, self.head, self.tail);
         f.debug_tuple("IterMut")
@@ -2299,14 +2299,14 @@ fn rfold<Acc, F>(self, mut accum: Acc, mut f: F) -> Acc
 }
 
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a, T> ExactSizeIterator for IterMut<'a, T> {
+impl<T> ExactSizeIterator for IterMut<'_, T> {
     fn is_empty(&self) -> bool {
         self.head == self.tail
     }
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T> FusedIterator for IterMut<'a, T> {}
+impl<T> FusedIterator for IterMut<'_, T> {}
 
 /// An owning iterator over the elements of a `VecDeque`.
 ///
@@ -2380,7 +2380,7 @@ pub struct Drain<'a, T: 'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a, T: 'a + fmt::Debug> fmt::Debug for Drain<'a, T> {
+impl<T: fmt::Debug> fmt::Debug for Drain<'_, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("Drain")
          .field(&self.after_tail)
@@ -2391,12 +2391,12 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-unsafe impl<'a, T: Sync> Sync for Drain<'a, T> {}
+unsafe impl<T: Sync> Sync for Drain<'_, T> {}
 #[stable(feature = "drain", since = "1.6.0")]
-unsafe impl<'a, T: Send> Send for Drain<'a, T> {}
+unsafe impl<T: Send> Send for Drain<'_, T> {}
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a, T: 'a> Drop for Drain<'a, T> {
+impl<T> Drop for Drain<'_, T> {
     fn drop(&mut self) {
         self.for_each(drop);
 
@@ -2443,7 +2443,7 @@ fn drop(&mut self) {
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a, T: 'a> Iterator for Drain<'a, T> {
+impl<T> Iterator for Drain<'_, T> {
     type Item = T;
 
     #[inline]
@@ -2458,7 +2458,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a, T: 'a> DoubleEndedIterator for Drain<'a, T> {
+impl<T> DoubleEndedIterator for Drain<'_, T> {
     #[inline]
     fn next_back(&mut self) -> Option<T> {
         self.iter.next_back().map(|elt| unsafe { ptr::read(elt) })
@@ -2466,10 +2466,10 @@ fn next_back(&mut self) -> Option<T> {
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a, T: 'a> ExactSizeIterator for Drain<'a, T> {}
+impl<T> ExactSizeIterator for Drain<'_, T> {}
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T: 'a> FusedIterator for Drain<'a, T> {}
+impl<T> FusedIterator for Drain<'_, T> {}
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<A: PartialEq> PartialEq for VecDeque<A> {
@@ -2519,7 +2519,7 @@ macro_rules! __impl_slice_eq1 {
     };
     ($Lhs: ty, $Rhs: ty, $Bound: ident) => {
         #[stable(feature = "vec_deque_partial_eq_slice", since = "1.17.0")]
-        impl<'a, 'b, A: $Bound, B> PartialEq<$Rhs> for $Lhs where A: PartialEq<B> {
+        impl<A: $Bound, B> PartialEq<$Rhs> for $Lhs where A: PartialEq<B> {
             fn eq(&self, other: &$Rhs) -> bool {
                 if self.len() != other.len() {
                     return false;
@@ -2533,15 +2533,15 @@ fn eq(&self, other: &$Rhs) -> bool {
 }
 
 __impl_slice_eq1! { VecDeque<A>, Vec<B> }
-__impl_slice_eq1! { VecDeque<A>, &'b [B] }
-__impl_slice_eq1! { VecDeque<A>, &'b mut [B] }
+__impl_slice_eq1! { VecDeque<A>, &[B] }
+__impl_slice_eq1! { VecDeque<A>, &mut [B] }
 
 macro_rules! array_impls {
     ($($N: expr)+) => {
         $(
             __impl_slice_eq1! { VecDeque<A>, [B; $N] }
-            __impl_slice_eq1! { VecDeque<A>, &'b [B; $N] }
-            __impl_slice_eq1! { VecDeque<A>, &'b mut [B; $N] }
+            __impl_slice_eq1! { VecDeque<A>, &[B; $N] }
+            __impl_slice_eq1! { VecDeque<A>, &mut [B; $N] }
         )+
     }
 }
index d74a3f004a3056d869b736844da14576b4ea6714..92d3e52d60c73efaf514fe3d8a06eb8114963a07 100644 (file)
@@ -1935,7 +1935,7 @@ fn hash<H: hash::Hasher>(&self, hasher: &mut H) {
 /// let c = a.to_string() + b;
 /// ```
 #[stable(feature = "rust1", since = "1.0.0")]
-impl<'a> Add<&'a str> for String {
+impl Add<&str> for String {
     type Output = String;
 
     #[inline]
@@ -1949,7 +1949,7 @@ fn add(mut self, other: &str) -> String {
 ///
 /// This has the same behavior as the [`push_str`][String::push_str] method.
 #[stable(feature = "stringaddassign", since = "1.12.0")]
-impl<'a> AddAssign<&'a str> for String {
+impl AddAssign<&str> for String {
     #[inline]
     fn add_assign(&mut self, other: &str) {
         self.push_str(other);
@@ -2183,7 +2183,7 @@ fn to_string(&self) -> String {
 }
 
 #[stable(feature = "cow_str_to_string_specialization", since = "1.17.0")]
-impl<'a> ToString for Cow<'a, str> {
+impl ToString for Cow<'_, str> {
     #[inline]
     fn to_string(&self) -> String {
         self[..].to_owned()
@@ -2373,19 +2373,19 @@ pub struct Drain<'a> {
 }
 
 #[stable(feature = "collection_debug", since = "1.17.0")]
-impl<'a> fmt::Debug for Drain<'a> {
+impl fmt::Debug for Drain<'_> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.pad("Drain { .. }")
     }
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-unsafe impl<'a> Sync for Drain<'a> {}
+unsafe impl Sync for Drain<'_> {}
 #[stable(feature = "drain", since = "1.6.0")]
-unsafe impl<'a> Send for Drain<'a> {}
+unsafe impl Send for Drain<'_> {}
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a> Drop for Drain<'a> {
+impl Drop for Drain<'_> {
     fn drop(&mut self) {
         unsafe {
             // Use Vec::drain. "Reaffirm" the bounds checks to avoid
@@ -2399,7 +2399,7 @@ fn drop(&mut self) {
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a> Iterator for Drain<'a> {
+impl Iterator for Drain<'_> {
     type Item = char;
 
     #[inline]
@@ -2413,7 +2413,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a> DoubleEndedIterator for Drain<'a> {
+impl DoubleEndedIterator for Drain<'_> {
     #[inline]
     fn next_back(&mut self) -> Option<char> {
         self.iter.next_back()
@@ -2421,4 +2421,4 @@ fn next_back(&mut self) -> Option<char> {
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a> FusedIterator for Drain<'a> {}
+impl FusedIterator for Drain<'_> {}
index 5e7a26132cb13739ef8667cfda1cb0f874495938..2512e27e316b753da4c41b32c56a022bcbd06bae 100644 (file)
@@ -1605,7 +1605,7 @@ fn from(t: T) -> Self {
 }
 
 #[stable(feature = "shared_from_slice", since = "1.21.0")]
-impl<'a, T: Clone> From<&'a [T]> for Arc<[T]> {
+impl<T: Clone> From<&[T]> for Arc<[T]> {
     #[inline]
     fn from(v: &[T]) -> Arc<[T]> {
         <Self as ArcFromSlice<T>>::from_slice(v)
@@ -1613,7 +1613,7 @@ fn from(v: &[T]) -> Arc<[T]> {
 }
 
 #[stable(feature = "shared_from_slice", since = "1.21.0")]
-impl<'a> From<&'a str> for Arc<str> {
+impl From<&str> for Arc<str> {
     #[inline]
     fn from(v: &str) -> Arc<str> {
         let arc = Arc::<[u8]>::from(v.as_bytes());
index b65c68d51a5027bf2bacfe5593e20f146dfbf8c8..e8fea287e1cb48583e11e59df2dd4a13f25f840f 100644 (file)
@@ -10,7 +10,7 @@ struct DropCounter<'a> {
     count: &'a mut u32,
 }
 
-impl<'a> Drop for DropCounter<'a> {
+impl Drop for DropCounter<'_> {
     fn drop(&mut self) {
         *self.count += 1;
     }
index 44183956d8fc7ca6aab110fb46b8f6d1f77c1d7c..313aa55a2b28eaf251f9d9eda25456402f4580cc 100644 (file)
@@ -1003,7 +1003,7 @@ struct DropCounter<'a> {
     count: &'a mut u32,
 }
 
-impl<'a> Drop for DropCounter<'a> {
+impl Drop for DropCounter<'_> {
     fn drop(&mut self) {
         *self.count += 1;
     }
index 8e097206881563d97955cbca20a9121e9ec133be..b43ba6cb57cad310fe8123655e1cf78ecd742cb1 100644 (file)
@@ -1481,7 +1481,7 @@ fn decrement_len(&mut self, decrement: usize) {
     }
 }
 
-impl<'a> Drop for SetLenOnDrop<'a> {
+impl Drop for SetLenOnDrop<'_> {
     #[inline]
     fn drop(&mut self) {
         *self.len = self.local_len;
@@ -2471,12 +2471,12 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-unsafe impl<'a, T: Sync> Sync for Drain<'a, T> {}
+unsafe impl<T: Sync> Sync for Drain<'_, T> {}
 #[stable(feature = "drain", since = "1.6.0")]
-unsafe impl<'a, T: Send> Send for Drain<'a, T> {}
+unsafe impl<T: Send> Send for Drain<'_, T> {}
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a, T> Iterator for Drain<'a, T> {
+impl<T> Iterator for Drain<'_, T> {
     type Item = T;
 
     #[inline]
@@ -2490,7 +2490,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a, T> DoubleEndedIterator for Drain<'a, T> {
+impl<T> DoubleEndedIterator for Drain<'_, T> {
     #[inline]
     fn next_back(&mut self) -> Option<T> {
         self.iter.next_back().map(|elt| unsafe { ptr::read(elt as *const _) })
@@ -2498,7 +2498,7 @@ fn next_back(&mut self) -> Option<T> {
 }
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a, T> Drop for Drain<'a, T> {
+impl<T> Drop for Drain<'_, T> {
     fn drop(&mut self) {
         // exhaust self first
         self.for_each(drop);
@@ -2522,14 +2522,14 @@ fn drop(&mut self) {
 
 
 #[stable(feature = "drain", since = "1.6.0")]
-impl<'a, T> ExactSizeIterator for Drain<'a, T> {
+impl<T> ExactSizeIterator for Drain<'_, T> {
     fn is_empty(&self) -> bool {
         self.iter.is_empty()
     }
 }
 
 #[stable(feature = "fused", since = "1.26.0")]
-impl<'a, T> FusedIterator for Drain<'a, T> {}
+impl<T> FusedIterator for Drain<'_, T> {}
 
 /// A splicing iterator for `Vec`.
 ///
@@ -2546,7 +2546,7 @@ pub struct Splice<'a, I: Iterator + 'a> {
 }
 
 #[stable(feature = "vec_splice", since = "1.21.0")]
-impl<'a, I: Iterator> Iterator for Splice<'a, I> {
+impl<I: Iterator> Iterator for Splice<'_, I> {
     type Item = I::Item;
 
     fn next(&mut self) -> Option<Self::Item> {
@@ -2559,18 +2559,18 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 }
 
 #[stable(feature = "vec_splice", since = "1.21.0")]
-impl<'a, I: Iterator> DoubleEndedIterator for Splice<'a, I> {
+impl<I: Iterator> DoubleEndedIterator for Splice<'_, I> {
     fn next_back(&mut self) -> Option<Self::Item> {
         self.drain.next_back()
     }
 }
 
 #[stable(feature = "vec_splice", since = "1.21.0")]
-impl<'a, I: Iterator> ExactSizeIterator for Splice<'a, I> {}
+impl<I: Iterator> ExactSizeIterator for Splice<'_, I> {}
 
 
 #[stable(feature = "vec_splice", since = "1.21.0")]
-impl<'a, I: Iterator> Drop for Splice<'a, I> {
+impl<I: Iterator> Drop for Splice<'_, I> {
     fn drop(&mut self) {
         self.drain.by_ref().for_each(drop);
 
@@ -2611,7 +2611,7 @@ fn drop(&mut self) {
 }
 
 /// Private helper methods for `Splice::drop`
-impl<'a, T> Drain<'a, T> {
+impl<T> Drain<'_, T> {
     /// The range from `self.vec.len` to `self.tail_start` contains elements
     /// that have been moved out.
     /// Fill that range as much as possible with new elements from the `replace_with` iterator.
@@ -2663,7 +2663,7 @@ pub struct DrainFilter<'a, T: 'a, F>
 }
 
 #[unstable(feature = "drain_filter", reason = "recently added", issue = "43244")]
-impl<'a, T, F> Iterator for DrainFilter<'a, T, F>
+impl<T, F> Iterator for DrainFilter<'_, T, F>
     where F: FnMut(&mut T) -> bool,
 {
     type Item = T;
@@ -2697,7 +2697,7 @@ fn size_hint(&self) -> (usize, Option<usize>) {
 }
 
 #[unstable(feature = "drain_filter", reason = "recently added", issue = "43244")]
-impl<'a, T, F> Drop for DrainFilter<'a, T, F>
+impl<T, F> Drop for DrainFilter<'_, T, F>
     where F: FnMut(&mut T) -> bool,
 {
     fn drop(&mut self) {