rust/tests/compile-fail/function_calls/check_arg_abi.rs

10 lines
207 B
Rust
Raw Normal View History

2021-01-29 14:16:17 -06:00
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
};
}