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: https://github.com/rust-lang/rust/issues/106116
|
||
|---|---|---|
| .. | ||
| alignment.rs | ||
| const_ptr.rs | ||
| metadata.rs | ||
| mod.rs | ||
| mut_ptr.rs | ||
| non_null.rs | ||
| unique.rs | ||