add test for caller ABI check
This commit is contained in:
parent
b38dc837f2
commit
9d777d8410
9
tests/compile-fail/check_arg_abi.rs
Normal file
9
tests/compile-fail/check_arg_abi.rs
Normal file
@ -0,0 +1,9 @@
|
||||
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
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user