]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_pointers/cast_fn_ptr2.rs
Add 'src/tools/miri/' from commit '75dd959a3a40eb5b4574f8d2e23aa6efbeb33573'
[rust.git] / src / tools / miri / tests / fail / function_pointers / cast_fn_ptr2.rs
1 fn main() {
2     fn f(_: (i32, i32)) {}
3
4     let g = unsafe { std::mem::transmute::<fn((i32, i32)), fn(i32)>(f) };
5
6     g(42) //~ ERROR: calling a function with argument of type (i32, i32) passing data of type i32
7 }