// compile-flags: -Zmiri-disable-abi-check #![feature(core_intrinsics)] fn main() { fn foo() {} extern "C" fn try_fn(ptr: *mut u8) { assert!(ptr.is_null()); } extern "Rust" { fn malloc(size: usize) -> *mut std::ffi::c_void; } unsafe { let _ = malloc(0); std::mem::transmute::(foo)(); std::intrinsics::r#try( std::mem::transmute::(try_fn), std::ptr::null_mut(), |_, _| unreachable!(), ); } }