]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_pointers/cast_fn_ptr5.rs
Rollup merge of #102036 - Patiga:remove-io-errorkind-other-use-in-std, r=Mark-Simulacrum
[rust.git] / src / tools / miri / tests / fail / function_pointers / cast_fn_ptr5.rs
1 fn main() {
2     fn f() -> u32 {
3         42
4     }
5
6     let g = unsafe { std::mem::transmute::<fn() -> u32, fn()>(f) };
7
8     g() //~ ERROR: calling a function with return type u32 passing return place of type ()
9 }