]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/cast_fn_ptr1.rs
3702ec8c94c4372f932e39a1b9d5e98518c0541e
[rust.git] / tests / compile-fail / cast_fn_ptr1.rs
1 fn main() {
2     fn f() {}
3
4     let g = unsafe {
5         std::mem::transmute::<fn(), fn(i32)>(f)
6     };
7
8     g(42) //~ ERROR calling a function with more arguments than it expected
9 }