]> 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 2d240b6a55ade8ae223a1fa16cc5e5fa573a874c..7e509d53c2614ee9a51d6550d0e2845e51b01eca 100644 (file)
@@ -1,3 +1,6 @@
+// Validation makes this fail in the wrong place
+// compile-flags: -Zmiri-disable-validation
+
 use std::mem;
 
 fn f() {}
@@ -7,5 +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: tried to use an integer pointer or a dangling pointer as a function pointer
+    x(); //~ ERROR function pointer but it does not point to a function
 }