diff --git a/library/core/src/slice/raw.rs b/library/core/src/slice/raw.rs index fa24a481a1f6..8ce1d18caaeb 100644 --- a/library/core/src/slice/raw.rs +++ b/library/core/src/slice/raw.rs @@ -213,7 +213,7 @@ pub const fn from_mut(s: &mut T) -> &mut [T] { /// /// [valid]: ptr#safety #[unstable(feature = "slice_from_ptr_range", issue = "89792")] -#[rustc_const_unstable(feature = "slice_from_ptr_range_const", issue = "89792")] +#[rustc_const_unstable(feature = "const_slice_from_ptr_range", issue = "89792")] pub const unsafe fn from_ptr_range<'a, T>(range: Range<*const T>) -> &'a [T] { // SAFETY: the caller must uphold the safety contract for `from_ptr_range`. unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) } diff --git a/src/test/ui/const-ptr/allowed_slices.rs b/src/test/ui/const-ptr/allowed_slices.rs index 12089c0a8e8d..645283d8fe5a 100644 --- a/src/test/ui/const-ptr/allowed_slices.rs +++ b/src/test/ui/const-ptr/allowed_slices.rs @@ -2,7 +2,7 @@ #![feature( const_slice_from_raw_parts, slice_from_ptr_range, - slice_from_ptr_range_const, + const_slice_from_ptr_range, pointer_byte_offsets, const_pointer_byte_offsets )] diff --git a/src/test/ui/const-ptr/forbidden_slices.rs b/src/test/ui/const-ptr/forbidden_slices.rs index e68b8da48212..7718d830e6ae 100644 --- a/src/test/ui/const-ptr/forbidden_slices.rs +++ b/src/test/ui/const-ptr/forbidden_slices.rs @@ -1,7 +1,7 @@ #![feature( const_slice_from_raw_parts, slice_from_ptr_range, - slice_from_ptr_range_const, + const_slice_from_ptr_range, pointer_byte_offsets, const_pointer_byte_offsets )]