rust/tests/compile-fail/function_calls/check_arg_abi.rs
2021-05-31 11:15:29 +08:00

10 lines
207 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
};
}