]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_pointers/cast_fn_ptr1.rs
Auto merge of #98840 - cjgillot:span-inline-ctxt, r=wesleywiser
[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 }