]> git.lizzy.rs Git - rust.git/commitdiff
Add reexport of slice::from{,_mut}_ptr_range to alloc & std
authorMaybe Waffle <waffle.lapkin@gmail.com>
Fri, 27 May 2022 14:37:33 +0000 (18:37 +0400)
committerMaybe Waffle <waffle.lapkin@gmail.com>
Mon, 30 May 2022 11:44:56 +0000 (15:44 +0400)
At first I was confused why `std::slice::from_ptr_range` didn't work :D

library/alloc/src/lib.rs
library/alloc/src/slice.rs

index fd21b3671182bbea095da16d49005a94dcd32e5d..35b8b386dceff21008885576aede37c0f9478511 100644 (file)
 #![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)]
index 199b3c9d0290c22abdd80a6aac327a539d67885e..4a9cecd9b4e1a3f3cf1297d1dbdbdf8f96962c9a 100644 (file)
 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")]