about summary refs log tree commit diff
path: root/library/std
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2022-12-12 04:16:18 -0500
committerTrevor Gross <tgross@intrepidcs.com>2023-03-29 18:04:44 -0400
commitd1b28b75d25d5f4c3d1769822a1b106b95b106f1 (patch)
tree917ab1932c5a35be335614d943a9ed7c3a6ab7c4 /library/std
parentdc4ba57566acac492df2c2074d2d7144566dc7df (diff)
downloadrust-d1b28b75d25d5f4c3d1769822a1b106b95b106f1.tar.gz
rust-d1b28b75d25d5f4c3d1769822a1b106b95b106f1.zip
Documentation updates to better share the purpose of OnceCell/OnceLock
Diffstat (limited to 'library/std')
-rw-r--r--library/std/src/sync/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/std/src/sync/mod.rs b/library/std/src/sync/mod.rs
index 5dd585b9b37..19641753ffe 100644
--- a/library/std/src/sync/mod.rs
+++ b/library/std/src/sync/mod.rs
@@ -133,7 +133,9 @@
 //! - [`Mutex`]: Mutual Exclusion mechanism, which ensures that at
 //!   most one thread at a time is able to access some data.
 //!
-//! - [`Once`]: Used for thread-safe, one-time initialization of a
+//! - [`Once`]: Used for a thread-safe, one-time global initialization routine
+//!
+//! - [`OnceLock`]: Used for thread-safe, one-time initialization of a
 //!   global variable.
 //!
 //! - [`RwLock`]: Provides a mutual exclusion mechanism which allows
@@ -147,6 +149,7 @@
 //! [`mpsc`]: crate::sync::mpsc
 //! [`Mutex`]: crate::sync::Mutex
 //! [`Once`]: crate::sync::Once
+//! [`OnceLock`]: crate::sync::OnceLock
 //! [`RwLock`]: crate::sync::RwLock
 
 #![stable(feature = "rust1", since = "1.0.0")]