From 6066089cc1726e71c176ef9caa25fa8a0145f3bd Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Wed, 30 Oct 2024 23:32:13 +0000 Subject: [PATCH] Skip setting `Send`/`Sync` in non-send mode for `UserDataCell` --- src/userdata/cell.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/userdata/cell.rs b/src/userdata/cell.rs index fe3a019..bd3b803 100644 --- a/src/userdata/cell.rs +++ b/src/userdata/cell.rs @@ -132,7 +132,9 @@ pub(crate) struct UserDataCell { value: UnsafeCell, } +#[cfg(feature = "send")] unsafe impl Send for UserDataCell {} +#[cfg(feature = "send")] unsafe impl Sync for UserDataCell {} impl UserDataCell {