mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 14:10:03 +03:00
organize compile-fail tests in folders
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user