]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/cast_fn_ptr5.rs
fb2b4403363ef22e4389c0891cc830ddf5bddb3d
[rust.git] / tests / compile-fail / cast_fn_ptr5.rs
1 fn main() {
2     fn f() -> u32 { 42 }
3
4     let g = unsafe {
5         std::mem::transmute::<fn() -> u32, fn()>(f)
6     };
7
8     g() //~ ERROR calling a function with return type u32 passing return place of type ()
9 }