From 36ba96ea3cfef575ddc5eea7754a1b70b50e2080 Mon Sep 17 00:00:00 2001 From: nwin Date: Fri, 20 Feb 2015 13:09:29 +0100 Subject: Implement `Debug` for `RwLock`, `arc::Weak` and `Mutex` --- src/liballoc/arc.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/liballoc') diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 934e6ab2159..8cd27125646 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -139,6 +139,13 @@ pub struct Weak { unsafe impl Send for Weak { } unsafe impl Sync for Weak { } +#[stable(feature = "rust1", since = "1.0.0")] +impl fmt::Debug for Weak { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "(Weak)") + } +} + struct ArcInner { strong: atomic::AtomicUsize, weak: atomic::AtomicUsize, -- cgit 1.4.1-3-g733a5