From 75df988d8a019af94d5a5928ec825da341bbbe28 Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Thu, 13 May 2021 17:08:57 +0200 Subject: [PATCH] Document safety of unsafe Sync impl --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index f5b3d82..499b6c7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -190,6 +190,7 @@ impl fmt::Debug for LazyMutexId { } } +/// Safety: the UnsafeCell is guaranteed to only be accessed mutably from a `Once`. unsafe impl Sync for LazyMutexId {} impl Deref for LazyMutexId {