Skip to content

Commit

Permalink
restore a test
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jun 5, 2022
1 parent 4322a78 commit e5dd503
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/test/ui/cast/casts-issue-46365.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit e5dd503

Please sign in to comment.