thread_local: refine LazyKeyInner::take safety doc
Co-authored-by: joboet <jonasboettiger@icloud.com>
This commit is contained in:
parent
43f21a6871
commit
c63b0ceb94
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ mod lazy {
|
||||||
/// Watch out: unsynchronized internal mutability!
|
/// Watch out: unsynchronized internal mutability!
|
||||||
///
|
///
|
||||||
/// # Safety
|
/// # Safety
|
||||||
/// Unsound if called while any `&'static T` is active.
|
/// Causes UB if any reference to the value is used after this.
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
pub(crate) unsafe fn take(&self) -> Option<T> {
|
pub(crate) unsafe fn take(&self) -> Option<T> {
|
||||||
let mutable: *mut _ = UnsafeCell::get(&self.inner);
|
let mutable: *mut _ = UnsafeCell::get(&self.inner);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue