]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_pointers/cast_fn_ptr1.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[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 }