summaryrefslogtreecommitdiffstats
path: root/tests/ui/abi/foreign/foreign-no-abi.rs
blob: 3f4f70c99e6a8d5415a9c05a1e4adc442058cea6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// run-pass
// ABI is cdecl by default

// ignore-wasm32-bare no libc to test ffi with
// pretty-expanded FIXME #23616

#![feature(rustc_private)]

mod rustrt {
    extern crate libc;

    #[link(name = "rust_test_helpers", kind = "static")]
    extern "C" {
        pub fn rust_get_test_int() -> libc::intptr_t;
    }
}

pub fn main() {
    unsafe {
        rustrt::rust_get_test_int();
    }
}