diff --git a/src/map.rs b/src/map.rs index 40e59de1f..7f06bd558 100644 --- a/src/map.rs +++ b/src/map.rs @@ -4406,8 +4406,12 @@ where Vacant(VacantEntryRef<'a, 'b, K, Q, V, S, A>), } -impl, Q: ?Sized + Debug, V: Debug, S, A: Allocator> Debug - for EntryRef<'_, '_, K, Q, V, S, A> +impl Debug for EntryRef<'_, '_, K, Q, V, S, A> +where + K: Borrow, + Q: Debug + ?Sized, + V: Debug, + A: Allocator, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match *self { @@ -4510,8 +4514,12 @@ where { } -impl, Q: ?Sized + Debug, V: Debug, S, A: Allocator> Debug - for OccupiedEntryRef<'_, '_, K, Q, V, S, A> +impl Debug for OccupiedEntryRef<'_, '_, K, Q, V, S, A> +where + K: Borrow, + Q: Debug + ?Sized, + V: Debug, + A: Allocator, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("OccupiedEntryRef") @@ -4557,8 +4565,11 @@ pub struct VacantEntryRef<'a, 'b, K, Q: ?Sized, V, S, A: Allocator = Global> { table: &'a mut HashMap, } -impl, Q: ?Sized + Debug, V, S, A: Allocator> Debug - for VacantEntryRef<'_, '_, K, Q, V, S, A> +impl Debug for VacantEntryRef<'_, '_, K, Q, V, S, A> +where + K: Borrow, + Q: Debug + ?Sized, + A: Allocator, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_tuple("VacantEntryRef").field(&self.key()).finish()