]> git.lizzy.rs Git - rust.git/blobdiff - tests/compile-fail/cast_int_to_fn_ptr.rs
Auto merge of #1308 - RalfJung:miri, r=RalfJung
[rust.git] / tests / compile-fail / cast_int_to_fn_ptr.rs
index 28d56a2cb6271815f85b332888a2b870eed930d0..3000779a93307e8ca3e325e5e694af674670bb79 100644 (file)
@@ -1,7 +1,10 @@
+// Validation makes this fail in the wrong place
+// compile-flags: -Zmiri-disable-validation
+
 fn main() {
     let g = unsafe {
         std::mem::transmute::<usize, fn(i32)>(42)
     };
 
-    g(42) //~ ERROR a memory access tried to interpret some bytes as a pointer
+    g(42) //~ ERROR invalid use of 42 as a pointer
 }