Skip to content

Commit

Permalink
Auto merge of #104977 - RalfJung:ptr-from-ref, r=dtolnay
Browse files Browse the repository at this point in the history
add ptr::from_{ref,mut}

We have methods to avoid almost all `as` casts around raw pointer handling, except for the initial cast from reference to raw pointer. These new methods close that gap.

(I also moved `null_mut` next to `null` to keep the file consistently organized.)

r? libs-api

Tracking issue: rust-lang/rust#106116
  • Loading branch information
bors committed Dec 24, 2022
2 parents 1972be5 + 85a496a commit 11bc6eb
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 11bc6eb

Please sign in to comment.