]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_pointers/cast_fn_ptr5.rs
Auto merge of #98457 - japaric:gh98378, r=m-ou-se
[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 }