]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/cast_fn_ptr3.rs
Merge branch 'master' into master
[rust.git] / tests / compile-fail / cast_fn_ptr3.rs
1 fn main() {
2     fn f(_ : (i32,i32)) {}
3
4     let g = unsafe {
5         std::mem::transmute::<fn((i32,i32)), fn()>(f)
6     };
7
8     g() //~ ERROR tried to call a function with incorrect number of arguments
9 }
10