]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/cast/casts-issue-46365.rs
restore a test
[rust.git] / src / test / ui / cast / casts-issue-46365.rs
index a2205b718c1ca31579578a1636f0b2836a16d093..50aa1a856a7161fc576bdce44120f92cf9a7a50c 100644 (file)
@@ -3,5 +3,6 @@ struct Lorem {
 }
 
 fn main() {
-    let _foo: *mut Lorem = core::ptr::NonNull::dangling().as_ptr(); // no error here
+    // Testing `as` casts, so deliberately not using `ptr::null`.
+    let _foo: *mut Lorem = 0 as *mut _; // no error here
 }