rust/tests/compile-fail/validity/execute_memory.rs
2020-05-01 10:29:39 +02:00

9 lines
175 B
Rust

#![feature(box_syntax)]
fn main() {
let x = box 42;
unsafe {
let _f = std::mem::transmute::<Box<i32>, fn()>(x); //~ ERROR expected a function pointer
}
}