]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_pointers/cast_fn_ptr4.rs
Rollup merge of #102044 - ChrisDenton:BCrypt-system-rand, r=thomcc
[rust.git] / src / tools / miri / tests / fail / function_pointers / cast_fn_ptr4.rs
1 fn main() {
2     fn f(_: *const [i32]) {}
3
4     let g = unsafe { std::mem::transmute::<fn(*const [i32]), fn(*const i32)>(f) };
5
6     g(&42 as *const i32) //~ ERROR: calling a function with argument of type *const [i32] passing data of type *const i32
7 }