]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_pointers/cast_fn_ptr1.rs
Rollup merge of #99460 - JanBeh:PR_asref_asmut_docs, r=joshtriplett
[rust.git] / src / tools / miri / tests / fail / function_pointers / cast_fn_ptr1.rs
1 fn main() {
2     fn f() {}
3
4     let g = unsafe { std::mem::transmute::<fn(), fn(i32)>(f) };
5
6     g(42) //~ ERROR: calling a function with more arguments than it expected
7 }