+// Validation makes this fail in the wrong place
+// compile-flags: -Zmiri-disable-validation
+
#![feature(box_syntax)]
fn main() {
- //FIXME: this span is wrong
- let x = box 42; //~ ERROR: tried to treat a memory pointer as a function pointer
+ let x = box 42;
unsafe {
let f = std::mem::transmute::<Box<i32>, fn()>(x);
- f()
+ f() //~ ERROR function pointer but it does not point to a function
}
}