Auto merge of #1696 - RalfJung:abi-check, r=RalfJung
add test for caller ABI check
This commit is contained in:
commit
bcb87a70f8
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…
Reference in New Issue
Block a user