about summary refs log tree commit diff
path: root/src/libcore/lib.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2020-05-06 07:43:18 +0200
committerSimon Sapin <simon.sapin@exyr.org>2020-05-18 21:29:43 +0200
commit49d5f5a977a1c0e0dffc8e189cef1977476f5253 (patch)
tree77a1498ff5e66aba467389200b71c76a7976e129 /src/libcore/lib.rs
parentd4bf05693c2c16e299f1adc279b54c37a8edef27 (diff)
downloadrust-49d5f5a977a1c0e0dffc8e189cef1977476f5253.tar.gz
rust-49d5f5a977a1c0e0dffc8e189cef1977476f5253.zip
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`.
Diffstat (limited to 'src/libcore/lib.rs')
-rw-r--r--src/libcore/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 3b7929f0016..ca13433caec 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -87,6 +87,8 @@
 #![feature(const_generics)]
 #![feature(const_ptr_offset_from)]
 #![feature(const_result)]
+#![feature(const_slice_from_raw_parts)]
+#![feature(const_slice_ptr_len)]
 #![feature(const_type_name)]
 #![feature(custom_inner_attributes)]
 #![feature(decl_macro)]