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 a5aa781 commit 0067ae3Copy full SHA for 0067ae3
objc-sys/src/lib.rs
@@ -68,6 +68,10 @@ macro_rules! generate_linking_tests {
68
// Get function pointer to make the linker require the
69
// symbol to be available.
70
let f: unsafe extern $abi fn($($t),*) $(-> $r)? = crate::$name;
71
+ // Workaround for https://github.com/rust-lang/rust/pull/92964
72
+ #[cfg(feature = "unstable-c-unwind")]
73
+ #[allow(clippy::useless_transmute)]
74
+ let f: unsafe extern "C" fn() = unsafe { core::mem::transmute(f) };
75
// Execute side-effect to ensure it is not optimized away.
76
std::println!("{:p}", f);
77
}
0 commit comments