Skip to content

Commit e5dd503

Browse files
committed
restore a test
1 parent 4322a78 commit e5dd503

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/ui/cast/casts-issue-46365.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ struct Lorem {
33
}
44

55
fn main() {
6-
let _foo: *mut Lorem = core::ptr::NonNull::dangling().as_ptr(); // no error here
6+
// Testing `as` casts, so deliberately not using `ptr::null`.
7+
let _foo: *mut Lorem = 0 as *mut _; // no error here
78
}

0 commit comments

Comments
 (0)