rust/tests/fail/function_calls/exported_symbol_wrong_arguments.rs

10 lines
178 B
Rust
Raw Normal View History

2021-04-15 16:19:23 -05:00
#[no_mangle]
fn foo() {}
fn main() {
extern "Rust" {
fn foo(_: i32);
}
unsafe { foo(1) } //~ ERROR calling a function with more arguments than it expected
}