]> git.lizzy.rs Git - rust.git/blobdiff - tests/compile-fail/strict_provenance_transmute.rs
rustup
[rust.git] / tests / compile-fail / strict_provenance_transmute.rs
index 0fc64295f94ce869832062aaa2c65d45b406b81c..a684d65b2ce11e2fd76bdd38d32312537277b15f 100644 (file)
@@ -7,7 +7,7 @@
 // <https://github.com/rust-lang/unsafe-code-guidelines/issues/286#issuecomment-1085144431>.
 
 unsafe fn deref(left: *const u8, right: *const u8) {
-    let left_int: usize = mem::transmute(left); //~ERROR expected initialized plain (non-pointer) bytes
+    let left_int: usize = mem::transmute(left); //~ERROR expected plain (non-pointer) bytes
     let right_int: usize = mem::transmute(right);
     if left_int == right_int {
         // The compiler is allowed to replace `left_int` by `right_int` here...