]> git.lizzy.rs Git - rust.git/commit
Add `len` and `slice_from_raw_parts` to `NonNull<[T]>`
authorSimon Sapin <simon.sapin@exyr.org>
Wed, 6 May 2020 05:43:18 +0000 (07:43 +0200)
committerSimon Sapin <simon.sapin@exyr.org>
Mon, 18 May 2020 19:29:43 +0000 (21:29 +0200)
commit49d5f5a977a1c0e0dffc8e189cef1977476f5253
tree77a1498ff5e66aba467389200b71c76a7976e129
parentd4bf05693c2c16e299f1adc279b54c37a8edef27
Add `len` and `slice_from_raw_parts` to `NonNull<[T]>`

This follows the precedent of the recently-added `<*const [T]>::len`
(adding to its tracking issue https://github.com/rust-lang/rust/issues/71146)
and `ptr::slice_from_raw_parts`.
src/libcore/lib.rs
src/libcore/ptr/non_null.rs