Skip to content

Commit

Permalink
TMP
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Jun 11, 2022
1 parent e883c95 commit 4b59a07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions objc-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ macro_rules! generate_linking_tests {
// Get function pointer to make the linker require the
// symbol to be available.
let f: unsafe extern $abi fn($($t),*) $(-> $r)? = crate::$name;
// Workaround for https://github.com/rust-lang/rust/pull/92964
let f: unsafe extern "C" fn() = unsafe { core::mem::transmute(f) };
// Execute side-effect to ensure it is not optimized away.
std::println!("{:p}", f);
}
Expand Down

0 comments on commit 4b59a07

Please sign in to comment.