diff --git a/crates/block2/src/global.rs b/crates/block2/src/global.rs index 3c3de49e4..84f9a3212 100644 --- a/crates/block2/src/global.rs +++ b/crates/block2/src/global.rs @@ -186,13 +186,15 @@ macro_rules! global_block { let mut layout = $crate::GlobalBlock::<($($t,)*) $(, $r)?>::__DEFAULT_LAYOUT; layout.isa = ::core::ptr::addr_of!($crate::ffi::_NSConcreteGlobalBlock); layout.invoke = ::core::option::Option::Some({ - unsafe extern "C" fn inner(_: *mut $crate::__BlockLayout, $($a: $t),*) $(-> $r)? { + unsafe extern "C" fn inner(_: *mut $crate::GlobalBlock<($($t,)*) $(, $r)?>, $($a: $t),*) $(-> $r)? { $body } - let inner: unsafe extern "C" fn(*mut $crate::__BlockLayout, $($a: $t),*) $(-> $r)? = inner; // TODO: SAFETY - ::core::mem::transmute(inner) + ::core::mem::transmute::< + unsafe extern "C" fn(*mut $crate::GlobalBlock<($($t,)*) $(, $r)?>, $($a: $t),*) $(-> $r)?, + unsafe extern "C" fn(), + >(inner) }); $crate::GlobalBlock::from_layout(layout) }; diff --git a/crates/block2/src/lib.rs b/crates/block2/src/lib.rs index b3b1ebf6d..1daf78174 100644 --- a/crates/block2/src/lib.rs +++ b/crates/block2/src/lib.rs @@ -242,8 +242,6 @@ pub mod ffi; mod global; mod rc_block; -#[doc(hidden)] -pub use abi::BlockLayout as __BlockLayout; pub use block::{Block, BlockArguments}; pub use concrete_block::{ConcreteBlock, IntoConcreteBlock}; pub use global::GlobalBlock;