]> git.lizzy.rs Git - rust.git/blobdiff - tests/compile-fail/fn_ptr_offset.rs
Auto merge of #1308 - RalfJung:miri, r=RalfJung
[rust.git] / tests / compile-fail / fn_ptr_offset.rs
index 0c0590e375bbca9129937d094b49f1a0afa474fe..7e509d53c2614ee9a51d6550d0e2845e51b01eca 100644 (file)
@@ -1,5 +1,5 @@
 // Validation makes this fail in the wrong place
-// compile-flags: -Zmir-emit-validate=0
+// compile-flags: -Zmiri-disable-validation
 
 use std::mem;
 
@@ -10,6 +10,5 @@ fn main() {
     let y : *mut u8 = unsafe { mem::transmute(x) };
     let y = y.wrapping_offset(1);
     let x : fn() = unsafe { mem::transmute(y) };
-    x(); //~ ERROR constant evaluation error
-    //~^ NOTE tried to use a function pointer after offsetting it
+    x(); //~ ERROR function pointer but it does not point to a function
 }