From ca7297b86673cf06c7089a962b763abb246ec4d5 Mon Sep 17 00:00:00 2001 From: Violet Date: Mon, 25 Oct 2021 21:35:45 -0400 Subject: [PATCH] remove requirement of T: Debug from Weak --- library/alloc/src/rc.rs | 2 +- library/alloc/src/sync.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 493cf3117edf6..45333f38d8fc3 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -2393,7 +2393,7 @@ impl Clone for Weak { } #[stable(feature = "rc_weak", since = "1.4.0")] -impl fmt::Debug for Weak { +impl fmt::Debug for Weak { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "(Weak)") } diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index b75e9a2f3c71e..a3422fb93c87a 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -303,7 +303,7 @@ impl, U: ?Sized> CoerceUnsized> for Weak {} impl, U: ?Sized> DispatchFromDyn> for Weak {} #[stable(feature = "arc_weak", since = "1.4.0")] -impl fmt::Debug for Weak { +impl fmt::Debug for Weak { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "(Weak)") }