]> 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 2a08d9f1f9f85080fabd5bec569f188b1bb9d3ad..3000779a93307e8ca3e325e5e694af674670bb79 100644 (file)
@@ -1,11 +1,10 @@
 // Validation makes this fail in the wrong place
-// compile-flags: -Zmir-emit-validate=0 -Zmiri-disable-validation
+// compile-flags: -Zmiri-disable-validation
 
 fn main() {
     let g = unsafe {
         std::mem::transmute::<usize, fn(i32)>(42)
     };
 
-    g(42) //~ ERROR constant evaluation error
-    //~^ NOTE a memory access tried to interpret some bytes as a pointer
+    g(42) //~ ERROR invalid use of 42 as a pointer
 }