]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/deref_fn_ptr.rs
Auto merge of #1308 - RalfJung:miri, r=RalfJung
[rust.git] / tests / compile-fail / 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 contains a function
6     };
7     panic!("this should never print: {}", x);
8 }