Auto merge of #1696 - RalfJung:abi-check, r=RalfJung
add test for caller ABI check
This commit is contained in:
commit
bcb87a70f8
1 changed files with 9 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue