Skip to content

Commit

Permalink
Auto merge of rust-lang#1696 - RalfJung:abi-check, r=RalfJung
Browse files Browse the repository at this point in the history
add test for caller ABI check
  • Loading branch information
bors committed Jan 29, 2021
2 parents b38dc83 + 9d777d8 commit bcb87a7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/compile-fail/check_arg_abi.rs
Original file line number Diff line number Diff line change
@@ -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
};
}

0 comments on commit bcb87a7

Please sign in to comment.