]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/execute_memory.rs
Auto merge of #1308 - RalfJung:miri, r=RalfJung
[rust.git] / tests / compile-fail / execute_memory.rs
1 // Validation makes this fail in the wrong place
2 // compile-flags: -Zmiri-disable-validation
3
4 #![feature(box_syntax)]
5
6 fn main() {
7     let x = box 42;
8     unsafe {
9         let f = std::mem::transmute::<Box<i32>, fn()>(x);
10         f() //~ ERROR function pointer but it does not point to a function
11     }
12 }