]> git.lizzy.rs Git - rust.git/blobdiff - tests/compile-fail/dangling_zst_deref.rs
Auto merge of #1308 - RalfJung:miri, r=RalfJung
[rust.git] / tests / compile-fail / dangling_zst_deref.rs
index 0a8480675f3d49792e81f21adb965e483980c339..13e5f9d321735c336139fe8eeb1303a32555481b 100644 (file)
@@ -3,5 +3,5 @@ fn main() {
         let b = Box::new(42);
         &*b as *const i32 as *const ()
     };
-    let _x = unsafe { *p }; //~ ERROR dangling pointer was dereferenced
+    let _x = unsafe { *p }; //~ ERROR dereferenced after this allocation got freed
 }