about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/core/src/cell/once.rs4
-rw-r--r--library/std/src/sync/once_lock.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/cell/once.rs b/library/core/src/cell/once.rs
index a7c3dfc982d..872b4da4dbf 100644
--- a/library/core/src/cell/once.rs
+++ b/library/core/src/cell/once.rs
@@ -2,12 +2,12 @@ use crate::cell::UnsafeCell;
 use crate::fmt;
 use crate::mem;
 
-/// A cell which can be written to only once.
+/// A cell which can nominally be written to only once.
 ///
 /// This allows obtaining a shared `&T` reference to its inner value without copying or replacing
 /// it (unlike [`Cell`]), and without runtime borrow checks (unlike [`RefCell`]). However,
 /// only immutable references can be obtained unless one has a mutable reference to the cell
-/// itself.
+/// itself. In the same vein, the cell can only be re-initialized with such a mutable reference.
 ///
 /// For a thread-safe version of this struct, see [`std::sync::OnceLock`].
 ///
diff --git a/library/std/src/sync/once_lock.rs b/library/std/src/sync/once_lock.rs
index fc830bacced..6b9f70da854 100644
--- a/library/std/src/sync/once_lock.rs
+++ b/library/std/src/sync/once_lock.rs
@@ -5,7 +5,7 @@ use crate::mem::MaybeUninit;
 use crate::panic::{RefUnwindSafe, UnwindSafe};
 use crate::sync::Once;
 
-/// A synchronization primitive which can be written to only once.
+/// A synchronization primitive which can nominally be written to only once.
 ///
 /// This type is a thread-safe [`OnceCell`], and can be used in statics.
 ///