diff options
| author | Jubilee <46493976+workingjubilee@users.noreply.github.com> | 2024-04-26 18:28:46 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-26 18:28:46 -0700 |
| commit | c63b0ceb94c4c953f080ff0c543a950737408ff7 (patch) | |
| tree | 684acdf2575480eecf9ea0b76a289b311ff3ac20 | |
| parent | 43f21a6871542df7546d9858d258207d947d3d2c (diff) | |
| download | rust-c63b0ceb94c4c953f080ff0c543a950737408ff7.tar.gz rust-c63b0ceb94c4c953f080ff0c543a950737408ff7.zip | |
thread_local: refine LazyKeyInner::take safety doc
Co-authored-by: joboet <jonasboettiger@icloud.com>
| -rw-r--r-- | library/std/src/sys/thread_local/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/thread_local/mod.rs b/library/std/src/sys/thread_local/mod.rs index 4fcea052ed0..7500c95d8b4 100644 --- a/library/std/src/sys/thread_local/mod.rs +++ b/library/std/src/sys/thread_local/mod.rs @@ -94,7 +94,7 @@ mod lazy { /// Watch out: unsynchronized internal mutability! /// /// # Safety - /// Unsound if called while any `&'static T` is active. + /// Causes UB if any reference to the value is used after this. #[allow(unused)] pub(crate) unsafe fn take(&self) -> Option<T> { let mutable: *mut _ = UnsafeCell::get(&self.inner); |
