Skip to content

Commit c63b0ce

Browse files
thread_local: refine LazyKeyInner::take safety doc
Co-authored-by: joboet <jonasboettiger@icloud.com>
1 parent 43f21a6 commit c63b0ce

File tree

1 file changed

+1
-1
lines changed
  • library/std/src/sys/thread_local

1 file changed

+1
-1
lines changed

library/std/src/sys/thread_local/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ mod lazy {
9494
/// Watch out: unsynchronized internal mutability!
9595
///
9696
/// # Safety
97-
/// Unsound if called while any `&'static T` is active.
97+
/// Causes UB if any reference to the value is used after this.
9898
#[allow(unused)]
9999
pub(crate) unsafe fn take(&self) -> Option<T> {
100100
let mutable: *mut _ = UnsafeCell::get(&self.inner);

0 commit comments

Comments
 (0)