]> git.lizzy.rs Git - rust.git/blob - tests/fail/function_pointers/deref_fn_ptr.rs
make use of get_alloc_info
[rust.git] / tests / fail / function_pointers / deref_fn_ptr.rs
1 fn f() {}
2
3 fn main() {
4     let x: u8 = unsafe {
5         *std::mem::transmute::<fn(), *const u8>(f) //~ ERROR out-of-bounds
6     };
7     panic!("this should never print: {}", x);
8 }