We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
extern "C-unwind"
1 parent fa3fd4c commit bb25515Copy full SHA for bb25515
objc-sys/src/lib.rs
@@ -71,6 +71,10 @@ macro_rules! generate_linking_tests {
71
// Get function pointer to make the linker require the
72
// symbol to be available.
73
let f: unsafe extern $abi fn($($t),*) $(-> $r)? = crate::$name;
74
+ // Workaround for https://github.com/rust-lang/rust/pull/92964
75
+ #[cfg(feature = "unstable-c-unwind")]
76
+ #[allow(clippy::useless_transmute)]
77
+ let f: unsafe extern "C" fn() = unsafe { core::mem::transmute(f) };
78
// Execute side-effect to ensure it is not optimized away.
79
std::println!("{:p}", f);
80
}
0 commit comments