We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
MaybeUnsafeCell<T>
Send
T: Sync
1 parent da6f527 commit 6a664b9Copy full SHA for 6a664b9
crates/bevy_ptr/src/lib.rs
@@ -349,3 +349,7 @@ impl<T> Clone for MaybeUnsafeCell<'_, T> {
349
*self
350
}
351
352
+
353
+// SAFETY: If `T` is `Sync`, `&T` is `Send` and while `&UnsafeCell<T>` is !Sync, users of
354
+// `MaybeUnsafeCell<T>` are already responsible for ensuring mutable access is unique.
355
+unsafe impl<T: Sync> Send for MaybeUnsafeCell<'_, T> {}
0 commit comments