]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_pointers/cast_fn_ptr1.rs
Rollup merge of #101642 - SkiFire13:fix-inplace-collection-leak, r=the8472
[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 }