summaryrefslogtreecommitdiffstats
path: root/library/std/src/sys_common/thread_local_key.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/sys_common/thread_local_key.rs')
-rw-r--r--library/std/src/sys_common/thread_local_key.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/sys_common/thread_local_key.rs b/library/std/src/sys_common/thread_local_key.rs
index 70beebe86..032bf604d 100644
--- a/library/std/src/sys_common/thread_local_key.rs
+++ b/library/std/src/sys_common/thread_local_key.rs
@@ -69,8 +69,10 @@ use crate::sys_common::mutex::StaticMutex;
/// ```ignore (cannot-doctest-private-modules)
/// use tls::os::{StaticKey, INIT};
///
+/// // Use a regular global static to store the key.
/// static KEY: StaticKey = INIT;
///
+/// // The state provided via `get` and `set` is thread-local.
/// unsafe {
/// assert!(KEY.get().is_null());
/// KEY.set(1 as *mut u8);