rust/tests/compile-fail/validity/execute_memory.rs
2021-02-17 09:37:21 +01: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
}
}