]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_pointers/cast_fn_ptr1.rs
Rollup merge of #101875 - fmease:allow-more-negative-copy-impls, r=lcnr
[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 }