organize compile-fail tests in folders
This commit is contained in:
parent
910afefcf6
commit
b2bf4ec2f5
73 changed files with 2 additions and 2 deletions
12
tests/compile-fail/function_pointers/execute_memory.rs
Normal file
12
tests/compile-fail/function_pointers/execute_memory.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// Validation makes this fail in the wrong place
|
||||
// compile-flags: -Zmiri-disable-validation
|
||||
|
||||
#![feature(box_syntax)]
|
||||
|
||||
fn main() {
|
||||
let x = box 42;
|
||||
unsafe {
|
||||
let f = std::mem::transmute::<Box<i32>, fn()>(x);
|
||||
f() //~ ERROR function pointer but it does not point to a function
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue