about summary refs log tree commit diff
path: root/src/libstd/sys/unix/fast_thread_local.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2016-11-25 13:21:49 -0500
committerCorey Farwell <coreyf@rwell.org>2016-12-18 14:55:14 -0800
commit86fc63e62ddc0a271210b8cc7cc2a6de6874b8f8 (patch)
treeb4b2329077e4e537719a8f0556525c66d4d8f73c /src/libstd/sys/unix/fast_thread_local.rs
parent1f965cc8e9dc8f8b26eac99cffdef6501cf0c617 (diff)
downloadrust-86fc63e62ddc0a271210b8cc7cc2a6de6874b8f8.tar.gz
rust-86fc63e62ddc0a271210b8cc7cc2a6de6874b8f8.zip
Implement `fmt::Debug` for all structures in libstd.
Part of https://github.com/rust-lang/rust/issues/31869.

Also turn on the `missing_debug_implementations` lint at the crate
level.
Diffstat (limited to 'src/libstd/sys/unix/fast_thread_local.rs')
-rw-r--r--src/libstd/sys/unix/fast_thread_local.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstd/sys/unix/fast_thread_local.rs b/src/libstd/sys/unix/fast_thread_local.rs
index 0c625e7add9..f4f73646e1b 100644
--- a/src/libstd/sys/unix/fast_thread_local.rs
+++ b/src/libstd/sys/unix/fast_thread_local.rs
@@ -12,6 +12,7 @@
 #![unstable(feature = "thread_local_internals", issue = "0")]
 
 use cell::{Cell, UnsafeCell};
+use fmt;
 use intrinsics;
 use ptr;
 
@@ -24,6 +25,12 @@ pub struct Key<T> {
     dtor_running: Cell<bool>,
 }
 
+impl<T> fmt::Debug for Key<T> {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        f.pad("Key { .. }")
+    }
+}
+
 unsafe impl<T> ::marker::Sync for Key<T> { }
 
 impl<T> Key<T> {