rust/tests/compile-fail/function_calls/check_arg_count_abort.rs

11 lines
194 B
Rust
Raw Normal View History

2021-06-11 02:47:12 -05:00
fn main() {
extern "C" {
fn abort(_: i32) -> !;
}
unsafe {
abort(1);
//~^ ERROR Undefined Behavior: incorrect number of arguments: got 1, expected 0
}
}