Skip to content

Commit df2dd5c

Browse files
RalfJunggitbot
authored and
gitbot
committed
get rid of a bunch of unnecessary rustc_const_unstable
1 parent e49611d commit df2dd5c

File tree

8 files changed

+1
-14
lines changed

8 files changed

+1
-14
lines changed

alloc/src/collections/binary_heap/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,6 @@ impl<T: Ord, A: Allocator> BinaryHeap<T, A> {
486486
/// heap.push(4);
487487
/// ```
488488
#[unstable(feature = "allocator_api", issue = "32838")]
489-
#[rustc_const_unstable(feature = "const_binary_heap_new_in", issue = "125961")]
490489
#[must_use]
491490
pub const fn new_in(alloc: A) -> BinaryHeap<T, A> {
492491
BinaryHeap { data: Vec::new_in(alloc) }

core/src/cell.rs

-1
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,6 @@ impl<T, const N: usize> Cell<[T; N]> {
713713
/// let array_cell: &[Cell<i32>; 3] = cell_array.as_array_of_cells();
714714
/// ```
715715
#[unstable(feature = "as_array_of_cells", issue = "88248")]
716-
#[rustc_const_unstable(feature = "as_array_of_cells", issue = "88248")]
717716
pub const fn as_array_of_cells(&self) -> &[Cell<T>; N] {
718717
// SAFETY: `Cell<T>` has the same memory layout as `T`.
719718
unsafe { &*(self as *const Cell<[T; N]> as *const [Cell<T>; N]) }

core/src/num/nonzero.rs

-1
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,6 @@ macro_rules! nonzero_integer {
614614
/// ```
615615
///
616616
#[unstable(feature = "non_zero_count_ones", issue = "120287")]
617-
#[rustc_const_unstable(feature = "non_zero_count_ones", issue = "120287")]
618617
#[doc(alias = "popcount")]
619618
#[doc(alias = "popcnt")]
620619
#[must_use = "this returns the result of the operation, \

core/src/num/uint_macros.rs

-1
Original file line numberDiff line numberDiff line change
@@ -3162,7 +3162,6 @@ macro_rules! uint_impl {
31623162
#[inline]
31633163
#[unstable(feature = "wrapping_next_power_of_two", issue = "32463",
31643164
reason = "needs decision on wrapping behavior")]
3165-
#[rustc_const_unstable(feature = "wrapping_next_power_of_two", issue = "32463")]
31663165
#[must_use = "this returns the result of the operation, \
31673166
without modifying the original"]
31683167
pub const fn wrapping_next_power_of_two(self) -> Self {

core/src/ptr/const_ptr.rs

-3
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,6 @@ impl<T: ?Sized> *const T {
346346
/// ```
347347
#[inline]
348348
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
349-
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
350349
pub const unsafe fn as_uninit_ref<'a>(self) -> Option<&'a MaybeUninit<T>>
351350
where
352351
T: Sized,
@@ -1528,7 +1527,6 @@ impl<T> *const [T] {
15281527
///
15291528
/// If `N` is not exactly equal to the length of `self`, then this method returns `None`.
15301529
#[unstable(feature = "slice_as_array", issue = "133508")]
1531-
#[rustc_const_unstable(feature = "slice_as_array", issue = "133508")]
15321530
#[inline]
15331531
#[must_use]
15341532
pub const fn as_array<const N: usize>(self) -> Option<*const [T; N]> {
@@ -1608,7 +1606,6 @@ impl<T> *const [T] {
16081606
/// [allocated object]: crate::ptr#allocated-object
16091607
#[inline]
16101608
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
1611-
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
16121609
pub const unsafe fn as_uninit_slice<'a>(self) -> Option<&'a [MaybeUninit<T>]> {
16131610
if self.is_null() {
16141611
None

core/src/ptr/mut_ptr.rs

-5
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ impl<T: ?Sized> *mut T {
342342
/// ```
343343
#[inline]
344344
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
345-
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
346345
pub const unsafe fn as_uninit_ref<'a>(self) -> Option<&'a MaybeUninit<T>>
347346
where
348347
T: Sized,
@@ -676,7 +675,6 @@ impl<T: ?Sized> *mut T {
676675
/// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion).
677676
#[inline]
678677
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
679-
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
680678
pub const unsafe fn as_uninit_mut<'a>(self) -> Option<&'a mut MaybeUninit<T>>
681679
where
682680
T: Sized,
@@ -1762,7 +1760,6 @@ impl<T> *mut [T] {
17621760
///
17631761
/// If `N` is not exactly equal to the length of `self`, then this method returns `None`.
17641762
#[unstable(feature = "slice_as_array", issue = "133508")]
1765-
#[rustc_const_unstable(feature = "slice_as_array", issue = "133508")]
17661763
#[inline]
17671764
#[must_use]
17681765
pub const fn as_mut_array<const N: usize>(self) -> Option<*mut [T; N]> {
@@ -1963,7 +1960,6 @@ impl<T> *mut [T] {
19631960
/// [allocated object]: crate::ptr#allocated-object
19641961
#[inline]
19651962
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
1966-
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
19671963
pub const unsafe fn as_uninit_slice<'a>(self) -> Option<&'a [MaybeUninit<T>]> {
19681964
if self.is_null() {
19691965
None
@@ -2015,7 +2011,6 @@ impl<T> *mut [T] {
20152011
/// [allocated object]: crate::ptr#allocated-object
20162012
#[inline]
20172013
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
2018-
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
20192014
pub const unsafe fn as_uninit_slice_mut<'a>(self) -> Option<&'a mut [MaybeUninit<T>]> {
20202015
if self.is_null() {
20212016
None

core/src/ptr/unique.rs

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ impl<T: ?Sized> Unique<T> {
9292

9393
/// Creates a new `Unique` if `ptr` is non-null.
9494
#[inline]
95+
// rustc_const_unstable attribute can be removed when `const_nonnull_new` is stable
9596
#[rustc_const_unstable(feature = "ptr_internals", issue = "none")]
9697
pub const fn new(ptr: *mut T) -> Option<Self> {
9798
if let Some(pointer) = NonNull::new(ptr) {

core/src/slice/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,6 @@ impl<T> [T] {
860860
///
861861
/// If `N` is not exactly equal to slice's the length of `self`, then this method returns `None`.
862862
#[unstable(feature = "slice_as_array", issue = "133508")]
863-
#[rustc_const_unstable(feature = "slice_as_array", issue = "133508")]
864863
#[inline]
865864
#[must_use]
866865
pub const fn as_array<const N: usize>(&self) -> Option<&[T; N]> {
@@ -879,7 +878,6 @@ impl<T> [T] {
879878
///
880879
/// If `N` is not exactly equal to the length of `self`, then this method returns `None`.
881880
#[unstable(feature = "slice_as_array", issue = "133508")]
882-
#[rustc_const_unstable(feature = "slice_as_array", issue = "133508")]
883881
#[inline]
884882
#[must_use]
885883
pub const fn as_mut_array<const N: usize>(&mut self) -> Option<&mut [T; N]> {

0 commit comments

Comments
 (0)