rust/library/core
bors 7e4f4660eb Auto merge of #104977 - RalfJung:ptr-from-ref, r=dtolnay
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
2022-12-24 17:14:26 +00:00
..
benches Rollup merge of #103570 - lukas-code:stabilize-ilog, r=scottmcm 2022-11-09 19:21:21 +05:30
primitive_docs
src Auto merge of #104977 - RalfJung:ptr-from-ref, r=dtolnay 2022-12-24 17:14:26 +00:00
tests char: µoptimise UTF-16 surrogates decoding 2022-12-23 14:15:33 +01:00
Cargo.toml