summaryrefslogtreecommitdiffstats
path: root/tests/ui/abi/extern/extern-call-direct.rs
blob: 19b901d49a4280dccb0927c9bc95c9cd28c7fd04 (plain)
1
2
3
4
5
6
7
8
9
10
// run-pass
// Test direct calls to extern fns.


extern "C" fn f(x: usize) -> usize { x * 2 }

pub fn main() {
    let x = f(22);
    assert_eq!(x, 44);
}