From ff9efd8a558a9b279812f07eced7955e22830d8e Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Fri, 27 May 2022 18:37:33 +0400 Subject: Add reexport of slice::from{,_mut}_ptr_range to alloc & std At first I was confused why `std::slice::from_ptr_range` didn't work :D --- library/alloc/src/lib.rs | 1 + library/alloc/src/slice.rs | 2 ++ 2 files changed, 3 insertions(+) (limited to 'library/alloc/src') diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index fd21b367118..35b8b386dce 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -130,6 +130,7 @@ #![feature(ptr_sub_ptr)] #![feature(receiver_trait)] #![feature(set_ptr_value)] +#![feature(slice_from_ptr_range)] #![feature(slice_group_by)] #![feature(slice_ptr_get)] #![feature(slice_ptr_len)] diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs index 199b3c9d029..4a9cecd9b4e 100644 --- a/library/alloc/src/slice.rs +++ b/library/alloc/src/slice.rs @@ -114,6 +114,8 @@ pub use core::slice::EscapeAscii; pub use core::slice::SliceIndex; #[stable(feature = "from_ref", since = "1.28.0")] pub use core::slice::{from_mut, from_ref}; +#[unstable(feature = "slice_from_ptr_range", issue = "89792")] +pub use core::slice::{from_mut_ptr_range, from_ptr_range}; #[stable(feature = "rust1", since = "1.0.0")] pub use core::slice::{from_raw_parts, from_raw_parts_mut}; #[stable(feature = "rust1", since = "1.0.0")] -- cgit 1.4.1-3-g733a5