rust/tests/compile-fail/function_calls/exported_symbol_wrong_arguments.rs
2021-05-31 11:15:29 +08:00

10 lines
178 B
Rust

#[no_mangle]
fn foo() {}
fn main() {
extern "Rust" {
fn foo(_: i32);
}
unsafe { foo(1) } //~ ERROR calling a function with more arguments than it expected
}