diff --git a/library/alloc/src/rc.rs b/library/alloc/src/rc.rs index 80a5913daa6e0..c1d853ed65216 100644 --- a/library/alloc/src/rc.rs +++ b/library/alloc/src/rc.rs @@ -2561,7 +2561,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 ddcd863aa3e33..d833d4d1dfbd3 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -312,7 +312,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)") }