]> git.lizzy.rs Git - rust.git/blobdiff - tests/compile-fail/copy_null.rs
Auto merge of #1308 - RalfJung:miri, r=RalfJung
[rust.git] / tests / compile-fail / copy_null.rs
index ce2fbe170e45da50966ec4dc3729cdb36f17ef6d..b14bdc4b3863273f4f38ff006ce6267e7875038d 100644 (file)
@@ -1,4 +1,3 @@
-//error-pattern: invalid use of NULL pointer
 #![feature(intrinsics)]
 
 // Directly call intrinsic to avoid debug assertions in libstd
@@ -10,5 +9,5 @@ fn main() {
     let mut data = [0u16; 4];
     let ptr = &mut data[0] as *mut u16;
     // Even copying 0 elements from NULL should error.
-    unsafe { copy_nonoverlapping(std::ptr::null(), ptr, 0); }
+    unsafe { copy_nonoverlapping(std::ptr::null(), ptr, 0); } //~ ERROR: invalid use of NULL pointer
 }