mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-16 08:53:35 +00:00
11 lines
156 B
Rust
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);
|
|
}
|