rust/tests/fail/function_calls/check_arg_abi.rs
2022-07-11 11:48:56 +00:00

10 lines
208 B
Rust

fn main() {
extern "Rust" {
fn malloc(size: usize) -> *mut std::ffi::c_void;
}
unsafe {
let _ = malloc(0); //~ ERROR: calling a function with ABI C using caller ABI Rust
};
}