diff --git a/Cargo.toml b/Cargo.toml index 85d04dc4e..27102c228 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,6 +36,7 @@ must_use_candidate = "allow" option_if_let_else = "allow" borrow_as_ptr = "warn" +elidable_lifetime_names = "warn" manual_assert = "warn" manual_assert_eq = "warn" manual_let_else = "warn" diff --git a/src/map.rs b/src/map.rs index f922df507..671ef8a92 100644 --- a/src/map.rs +++ b/src/map.rs @@ -4271,7 +4271,7 @@ impl<'a, K, V, S, A: Allocator> VacantEntry<'a, K, V, S, A> { } } -impl<'a, 'b, K, Q: ?Sized, V, S, A: Allocator> EntryRef<'a, 'b, K, Q, V, S, A> { +impl<'a, K, Q: ?Sized, V, S, A: Allocator> EntryRef<'a, '_, K, Q, V, S, A> { /// Sets the value of the entry, and returns an `OccupiedEntry`. /// /// # Examples @@ -4465,7 +4465,7 @@ impl<'a, 'b, K, Q: ?Sized, V, S, A: Allocator> EntryRef<'a, 'b, K, Q, V, S, A> { } } -impl<'a, 'b, K, Q: ?Sized, V: Default, S, A: Allocator> EntryRef<'a, 'b, K, Q, V, S, A> { +impl<'a, K, Q: ?Sized, V: Default, S, A: Allocator> EntryRef<'a, '_, K, Q, V, S, A> { /// Ensures a value is in the entry by inserting the default value if empty, /// and returns a mutable reference to the value in the entry. /// diff --git a/src/table.rs b/src/table.rs index f50f575f6..0eb9d5685 100644 --- a/src/table.rs +++ b/src/table.rs @@ -2608,7 +2608,7 @@ pub struct IterMut<'a, T> { inner: RawIter, marker: PhantomData<&'a mut T>, } -impl<'a, T> IterMut<'a, T> { +impl IterMut<'_, T> { /// Returns a iterator of references over the remaining items. #[cfg_attr(feature = "inline-more", inline)] pub fn iter(&self) -> Iter<'_, T> { @@ -2725,7 +2725,7 @@ pub struct UnsafeIter<'a, T> { inner: RawIter, marker: PhantomData<&'a ()>, } -impl<'a, T> UnsafeIter<'a, T> { +impl UnsafeIter<'_, T> { /// Returns a iterator of references over the remaining items. #[cfg_attr(feature = "inline-more", inline)] pub fn iter(&self) -> Iter<'_, T> { @@ -2745,7 +2745,7 @@ impl Default for UnsafeIter<'_, T> { } } } -impl<'a, T> Iterator for UnsafeIter<'a, T> { +impl Iterator for UnsafeIter<'_, T> { type Item = NonNull; fn next(&mut self) -> Option { @@ -3110,7 +3110,7 @@ where pub struct Drain<'a, T, A: Allocator = Global> { inner: RawDrain<'a, T, A>, } -impl<'a, T, A: Allocator> Drain<'a, T, A> { +impl Drain<'_, T, A> { /// Returns a iterator of references over the remaining items. #[cfg_attr(feature = "inline-more", inline)] pub fn iter(&self) -> Iter<'_, T> {