rust/tests/compile-fail/check_arg_count_too_few_args.rs

13 lines
266 B
Rust
Raw Normal View History

2020-05-04 22:22:00 -05:00
#![feature(core_intrinsics)]
#![feature(rustc_private)]
fn main() {
extern "C" {
fn malloc() -> *mut std::ffi::c_void;
}
unsafe {
let _ = malloc(); //~ ERROR Undefined Behavior: incorrect number of arguments: got 0, expected 1
};
}