From e5dd503d6194be85f8c016425b723d39903ebf95 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 5 Jun 2022 12:00:43 -0400 Subject: [PATCH] restore a test --- src/test/ui/cast/casts-issue-46365.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/ui/cast/casts-issue-46365.rs b/src/test/ui/cast/casts-issue-46365.rs index a2205b718c1ca..50aa1a856a716 100644 --- a/src/test/ui/cast/casts-issue-46365.rs +++ b/src/test/ui/cast/casts-issue-46365.rs @@ -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 }