Rename slice_from_ptr_range_const -> const_slice_from_ptr_range
This is in line with other `const fn` features.
This commit is contained in:
parent
a63a83a8b6
commit
10ee6f8e06
3 changed files with 3 additions and 3 deletions
|
@ -213,7 +213,7 @@ pub const fn from_mut<T>(s: &mut T) -> &mut [T] {
|
||||||
///
|
///
|
||||||
/// [valid]: ptr#safety
|
/// [valid]: ptr#safety
|
||||||
#[unstable(feature = "slice_from_ptr_range", issue = "89792")]
|
#[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] {
|
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`.
|
// SAFETY: the caller must uphold the safety contract for `from_ptr_range`.
|
||||||
unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
|
unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#![feature(
|
#![feature(
|
||||||
const_slice_from_raw_parts,
|
const_slice_from_raw_parts,
|
||||||
slice_from_ptr_range,
|
slice_from_ptr_range,
|
||||||
slice_from_ptr_range_const,
|
const_slice_from_ptr_range,
|
||||||
pointer_byte_offsets,
|
pointer_byte_offsets,
|
||||||
const_pointer_byte_offsets
|
const_pointer_byte_offsets
|
||||||
)]
|
)]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#![feature(
|
#![feature(
|
||||||
const_slice_from_raw_parts,
|
const_slice_from_raw_parts,
|
||||||
slice_from_ptr_range,
|
slice_from_ptr_range,
|
||||||
slice_from_ptr_range_const,
|
const_slice_from_ptr_range,
|
||||||
pointer_byte_offsets,
|
pointer_byte_offsets,
|
||||||
const_pointer_byte_offsets
|
const_pointer_byte_offsets
|
||||||
)]
|
)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue