about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail/function_calls/check_arg_abi.rs
blob: 0e91636416903f45225dc0ee63947fb90248a450 (plain)
1
2
3
4
5
6
7
8
9
fn main() {
    extern "Rust" {
        fn malloc(size: usize) -> *mut std::ffi::c_void;
    }

    unsafe {
        let _ = malloc(0); //~ ERROR: calling a function with calling convention "C" using caller calling convention "Rust"
    };
}