about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2024-09-18 11:30:34 -0700
committerJubilee Young <workingjubilee@gmail.com>2024-09-18 11:39:24 -0700
commitf22797d3db7fac474662b2a6b3bf8c91679d8c33 (patch)
tree2059baffb2194631df06c904267e0b8a480c77c4 /library/std/src
parentd9cdb71497fbfcf36f6debd3fcf559c0fe3cf9ec (diff)
downloadrust-f22797d3db7fac474662b2a6b3bf8c91679d8c33.tar.gz
rust-f22797d3db7fac474662b2a6b3bf8c91679d8c33.zip
library: Call it really_init_mut to avoid name collisions
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/sync/lazy_lock.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sync/lazy_lock.rs b/library/std/src/sync/lazy_lock.rs
index f6b6887cdbb..4b5ab810a8a 100644
--- a/library/std/src/sync/lazy_lock.rs
+++ b/library/std/src/sync/lazy_lock.rs
@@ -156,7 +156,7 @@ impl<T, F: FnOnce() -> T> LazyLock<T, F> {
         #[cold]
         /// # Safety
         /// May only be called when the state is `Incomplete`.
-        unsafe fn really_init<T, F: FnOnce() -> T>(this: &mut LazyLock<T, F>) -> &mut T {
+        unsafe fn really_init_mut<T, F: FnOnce() -> T>(this: &mut LazyLock<T, F>) -> &mut T {
             struct PoisonOnPanic<'a, T, F>(&'a mut LazyLock<T, F>);
             impl<T, F> Drop for PoisonOnPanic<'_, T, F> {
                 #[inline]
@@ -184,7 +184,7 @@ impl<T, F: FnOnce() -> T> LazyLock<T, F> {
             // SAFETY: The `Once` states we completed the initialization.
             ExclusiveState::Complete => unsafe { &mut this.data.get_mut().value },
             // SAFETY: The state is `Incomplete`.
-            ExclusiveState::Incomplete => unsafe { really_init(this) },
+            ExclusiveState::Incomplete => unsafe { really_init_mut(this) },
         }
     }