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)") }