]> git.lizzy.rs Git - rust.git/blobdiff - tests/ui/transmute_ptr_to_ptr.rs
Addition `manual_map` test for `unsafe` blocks
[rust.git] / tests / ui / transmute_ptr_to_ptr.rs
index 26b03bdc74055665d927efde9bbd8ae50ccd6f71..9e213aab68c5704a2d2079391a6e0a56a7e2bc6f 100644 (file)
@@ -53,10 +53,10 @@ fn transmute_ptr_to_ptr() {
 
 // dereferencing raw pointers in const contexts, should not lint as it's unstable (issue 5959)
 const _: &() = {
-    struct ZST;
-    let zst = &ZST;
+    struct Zst;
+    let zst = &Zst;
 
-    unsafe { std::mem::transmute::<&'static ZST, &'static ()>(zst) }
+    unsafe { std::mem::transmute::<&'static Zst, &'static ()>(zst) }
 };
 
 fn main() {}