]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/validity/execute_memory.rs
426a51faf8a372a2c24a2afb5d4f7caf5f57c7b2
[rust.git] / tests / compile-fail / validity / execute_memory.rs
1 #![feature(box_syntax)]
2
3 fn main() {
4     let x = box 42;
5     unsafe {
6         let _f = std::mem::transmute::<Box<i32>, fn()>(x); //~ ERROR encountered a pointer, but expected a function pointer
7     }
8 }