Skip to content

Commit e1efb5e

Browse files
committed
Rename slice_from_ptr_range_const -> const_slice_from_ptr_range
This is in line with other `const fn` features.
1 parent 8024fd6 commit e1efb5e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

library/core/src/slice/raw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ pub const fn from_mut<T>(s: &mut T) -> &mut [T] {
213213
///
214214
/// [valid]: ptr#safety
215215
#[unstable(feature = "slice_from_ptr_range", issue = "89792")]
216-
#[rustc_const_unstable(feature = "slice_from_ptr_range_const", issue = "89792")]
216+
#[rustc_const_unstable(feature = "const_slice_from_ptr_range", issue = "89792")]
217217
pub const unsafe fn from_ptr_range<'a, T>(range: Range<*const T>) -> &'a [T] {
218218
// SAFETY: the caller must uphold the safety contract for `from_ptr_range`.
219219
unsafe { from_raw_parts(range.start, range.end.sub_ptr(range.start)) }

src/test/ui/const-ptr/allowed_slices.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![feature(
33
const_slice_from_raw_parts,
44
slice_from_ptr_range,
5-
slice_from_ptr_range_const,
5+
const_slice_from_ptr_range,
66
pointer_byte_offsets,
77
const_pointer_byte_offsets
88
)]

src/test/ui/const-ptr/forbidden_slices.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![feature(
22
const_slice_from_raw_parts,
33
slice_from_ptr_range,
4-
slice_from_ptr_range_const,
4+
const_slice_from_ptr_range,
55
pointer_byte_offsets,
66
const_pointer_byte_offsets
77
)]

0 commit comments

Comments
 (0)