]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_calls/check_arg_count_too_many_args.rs
Auto merge of #101837 - scottmcm:box-array-from-vec, r=m-ou-se
[rust.git] / src / tools / miri / tests / fail / function_calls / check_arg_count_too_many_args.rs
1 fn main() {
2     extern "C" {
3         fn malloc(_: i32, _: i32) -> *mut std::ffi::c_void;
4     }
5
6     unsafe {
7         let _ = malloc(1, 2); //~ ERROR: Undefined Behavior: incorrect number of arguments: got 2, expected 1
8     };
9 }