about summary refs log tree commit diff
path: root/src/tools/miri/tests/pass/cast_fn_ptr.rs
blob: 8954048f4262c61692514792200345bd87ca09e8 (plain)
1
2
3
4
5
6
7
fn main() {
    fn f(_: *const u8) {}

    let g = unsafe { std::mem::transmute::<fn(*const u8), fn(*const i32)>(f) };

    g(&42 as *const _);
}