Skip to content

Commit f28b1d1

Browse files
committed
move some const fn out of the const_ptr_as_ref feature
1 parent 4caabcd commit f28b1d1

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

core/src/ptr/const_ptr.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ impl<T: ?Sized> *const T {
300300
/// ```
301301
// FIXME: mention it in the docs for `as_ref` and `as_uninit_ref` once stabilized.
302302
#[unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
303-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
303+
#[rustc_const_unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
304304
#[inline]
305305
#[must_use]
306306
pub const unsafe fn as_ref_unchecked<'a>(self) -> &'a T {
@@ -334,7 +334,7 @@ impl<T: ?Sized> *const T {
334334
/// ```
335335
#[inline]
336336
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
337-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
337+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
338338
pub const unsafe fn as_uninit_ref<'a>(self) -> Option<&'a MaybeUninit<T>>
339339
where
340340
T: Sized,
@@ -1662,7 +1662,7 @@ impl<T> *const [T] {
16621662
/// [allocated object]: crate::ptr#allocated-object
16631663
#[inline]
16641664
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
1665-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
1665+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
16661666
pub const unsafe fn as_uninit_slice<'a>(self) -> Option<&'a [MaybeUninit<T>]> {
16671667
if self.is_null() {
16681668
None

core/src/ptr/mut_ptr.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ impl<T: ?Sized> *mut T {
310310
/// ```
311311
// FIXME: mention it in the docs for `as_ref` and `as_uninit_ref` once stabilized.
312312
#[unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
313-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
313+
#[rustc_const_unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
314314
#[inline]
315315
#[must_use]
316316
pub const unsafe fn as_ref_unchecked<'a>(self) -> &'a T {
@@ -349,7 +349,7 @@ impl<T: ?Sized> *mut T {
349349
/// ```
350350
#[inline]
351351
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
352-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
352+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
353353
pub const unsafe fn as_uninit_ref<'a>(self) -> Option<&'a MaybeUninit<T>>
354354
where
355355
T: Sized,
@@ -631,7 +631,7 @@ impl<T: ?Sized> *mut T {
631631
/// ```
632632
// FIXME: mention it in the docs for `as_mut` and `as_uninit_mut` once stabilized.
633633
#[unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
634-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
634+
#[rustc_const_unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
635635
#[inline]
636636
#[must_use]
637637
pub const unsafe fn as_mut_unchecked<'a>(self) -> &'a mut T {
@@ -654,7 +654,7 @@ impl<T: ?Sized> *mut T {
654654
/// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion).
655655
#[inline]
656656
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
657-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
657+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
658658
pub const unsafe fn as_uninit_mut<'a>(self) -> Option<&'a mut MaybeUninit<T>>
659659
where
660660
T: Sized,
@@ -2031,7 +2031,7 @@ impl<T> *mut [T] {
20312031
/// [allocated object]: crate::ptr#allocated-object
20322032
#[inline]
20332033
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
2034-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
2034+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
20352035
pub const unsafe fn as_uninit_slice<'a>(self) -> Option<&'a [MaybeUninit<T>]> {
20362036
if self.is_null() {
20372037
None
@@ -2083,7 +2083,7 @@ impl<T> *mut [T] {
20832083
/// [allocated object]: crate::ptr#allocated-object
20842084
#[inline]
20852085
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
2086-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
2086+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
20872087
pub const unsafe fn as_uninit_slice_mut<'a>(self) -> Option<&'a mut [MaybeUninit<T>]> {
20882088
if self.is_null() {
20892089
None

core/src/ptr/non_null.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl<T: Sized> NonNull<T> {
133133
#[inline]
134134
#[must_use]
135135
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
136-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
136+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
137137
pub const unsafe fn as_uninit_ref<'a>(self) -> &'a MaybeUninit<T> {
138138
// SAFETY: the caller must guarantee that `self` meets all the
139139
// requirements for a reference.
@@ -157,7 +157,7 @@ impl<T: Sized> NonNull<T> {
157157
#[inline]
158158
#[must_use]
159159
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
160-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
160+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
161161
pub const unsafe fn as_uninit_mut<'a>(self) -> &'a mut MaybeUninit<T> {
162162
// SAFETY: the caller must guarantee that `self` meets all the
163163
// requirements for a reference.
@@ -1563,7 +1563,7 @@ impl<T> NonNull<[T]> {
15631563
#[inline]
15641564
#[must_use]
15651565
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
1566-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
1566+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
15671567
pub const unsafe fn as_uninit_slice<'a>(self) -> &'a [MaybeUninit<T>] {
15681568
// SAFETY: the caller must uphold the safety contract for `as_uninit_slice`.
15691569
unsafe { slice::from_raw_parts(self.cast().as_ptr(), self.len()) }
@@ -1628,7 +1628,7 @@ impl<T> NonNull<[T]> {
16281628
#[inline]
16291629
#[must_use]
16301630
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
1631-
#[rustc_const_unstable(feature = "const_ptr_as_ref", issue = "91822")]
1631+
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
16321632
pub const unsafe fn as_uninit_slice_mut<'a>(self) -> &'a mut [MaybeUninit<T>] {
16331633
// SAFETY: the caller must uphold the safety contract for `as_uninit_slice_mut`.
16341634
unsafe { slice::from_raw_parts_mut(self.cast().as_ptr(), self.len()) }

0 commit comments

Comments
 (0)