rust/tests/ui/abi/extern/extern-call-direct.rs
2023-01-11 09:32:08 +00:00

11 lines
156 B
Rust

// 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);
}