Skip to content

Commit bcb87a7

Browse files
committed
Auto merge of #1696 - RalfJung:abi-check, r=RalfJung
add test for caller ABI check
2 parents b38dc83 + 9d777d8 commit bcb87a7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/compile-fail/check_arg_abi.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
fn main() {
2+
extern "Rust" {
3+
fn malloc(size: usize) -> *mut std::ffi::c_void;
4+
}
5+
6+
unsafe {
7+
let _ = malloc(0); //~ ERROR calling a function with ABI C using caller ABI Rust
8+
};
9+
}

0 commit comments

Comments
 (0)