Rollup merge of #97596 - WaffleLapkin:fixup_feature_name, r=compiler-errors

Fixup feature name to be more consistent with others

`slice_from_mut_ptr_range_const` -> `const_slice_from_mut_ptr_range`, we usually have `const` in the front.

I've made a typo in  #97419
This commit is contained in:
Matthias Krüger 2022-05-31 23:11:37 +02:00 committed by GitHub
commit 31fccd1a44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -264,7 +264,7 @@ pub const unsafe fn from_ptr_range<'a, T>(range: Range<*const T>) -> &'a [T] {
///
/// [valid]: ptr#safety
#[unstable(feature = "slice_from_ptr_range", issue = "89792")]
#[rustc_const_unstable(feature = "slice_from_mut_ptr_range_const", issue = "89792")]
#[rustc_const_unstable(feature = "const_slice_from_mut_ptr_range", issue = "89792")]
pub const unsafe fn from_mut_ptr_range<'a, T>(range: Range<*mut T>) -> &'a mut [T] {
// SAFETY: the caller must uphold the safety contract for `from_mut_ptr_range`.
unsafe { from_raw_parts_mut(range.start, range.end.sub_ptr(range.start)) }