From 26567b15d6f5db0bd4e9bc1efe80d973e6b1212e Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 23 Feb 2022 00:26:21 +0100 Subject: [PATCH] Properly mark objects as mutable behind shared references --- block-sys/src/lib.rs | 2 +- objc-sys/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block-sys/src/lib.rs b/block-sys/src/lib.rs index b989303ea..9fb38f84d 100644 --- a/block-sys/src/lib.rs +++ b/block-sys/src/lib.rs @@ -35,7 +35,7 @@ pub struct Class { _priv: [u8; 0], /// See objc_sys::OpaqueData - _opaque: PhantomData<(UnsafeCell<()>, *const UnsafeCell<()>, PhantomPinned)>, + _opaque: UnsafeCell, PhantomPinned)>>, } /// Block descriptor flags. diff --git a/objc-sys/src/lib.rs b/objc-sys/src/lib.rs index 5e733ec5a..12f0f5add 100644 --- a/objc-sys/src/lib.rs +++ b/objc-sys/src/lib.rs @@ -130,7 +130,7 @@ pub use various::*; /// (It's also less of a breaking change on our part if we re-add these). /// /// TODO: Replace this with `extern type` to also mark it as `!Sized`. -type OpaqueData = PhantomData<(UnsafeCell<()>, *const UnsafeCell<()>, PhantomPinned)>; +type OpaqueData = UnsafeCell, PhantomPinned)>>; #[cfg(test)] mod tests {