rust/tests/compile-fail/validity/execute_memory.rs
2021-02-16 09:55:33 +01:00

10 lines
215 B
Rust

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