]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_pointers/cast_fn_ptr3.rs
Rollup merge of #102854 - semarie:openbsd-immutablestack, r=m-ou-se
[rust.git] / src / tools / miri / tests / fail / function_pointers / cast_fn_ptr3.rs
1 fn main() {
2     fn f(_: (i32, i32)) {}
3
4     let g = unsafe { std::mem::transmute::<fn((i32, i32)), fn()>(f) };
5
6     g() //~ ERROR: calling a function with fewer arguments than it requires
7 }