Skip to content

Commit 8f7a106

Browse files
authored
Rollup merge of #133672 - RalfJung:const-stability-cleanup, r=jhpratt
Remove a bunch of unnecessary const stability noise
2 parents 811eaeb + 9182aa0 commit 8f7a106

File tree

14 files changed

+1
-47
lines changed

14 files changed

+1
-47
lines changed

library/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) }

library/alloc/src/lib.rs

-8
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@
9191
//
9292
// Library features:
9393
// tidy-alphabetical-start
94-
#![cfg_attr(not(no_global_oom_handling), feature(const_alloc_error))]
95-
#![cfg_attr(not(no_global_oom_handling), feature(const_btree_len))]
9694
#![cfg_attr(test, feature(str_as_str))]
9795
#![feature(alloc_layout_extra)]
9896
#![feature(allocator_api)]
@@ -107,13 +105,8 @@
107105
#![feature(box_uninit_write)]
108106
#![feature(clone_to_uninit)]
109107
#![feature(coerce_unsized)]
110-
#![feature(const_align_of_val)]
111-
#![feature(const_box)]
112108
#![feature(const_eval_select)]
113109
#![feature(const_heap)]
114-
#![feature(const_maybe_uninit_write)]
115-
#![feature(const_size_of_val)]
116-
#![feature(const_vec_string_slice)]
117110
#![feature(core_intrinsics)]
118111
#![feature(deprecated_suggestion)]
119112
#![feature(deref_pure_trait)]
@@ -170,7 +163,6 @@
170163
#![feature(allow_internal_unstable)]
171164
#![feature(cfg_sanitize)]
172165
#![feature(const_precise_live_drops)]
173-
#![feature(const_try)]
174166
#![feature(decl_macro)]
175167
#![feature(dropck_eyepatch)]
176168
#![feature(fundamental)]

library/alloc/tests/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
#![feature(assert_matches)]
55
#![feature(btree_extract_if)]
66
#![feature(cow_is_borrowed)]
7-
#![feature(const_heap)]
8-
#![feature(const_try)]
97
#![feature(core_intrinsics)]
108
#![feature(extract_if)]
119
#![feature(exact_size_is_empty)]

library/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]) }

library/core/src/lib.rs

-19
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,7 @@
109109
// tidy-alphabetical-start
110110
#![feature(array_ptr_get)]
111111
#![feature(asm_experimental_arch)]
112-
#![feature(const_align_of_val)]
113-
#![feature(const_align_of_val_raw)]
114-
#![feature(const_alloc_layout)]
115-
#![feature(const_black_box)]
116-
#![feature(const_eq_ignore_ascii_case)]
117112
#![feature(const_eval_select)]
118-
#![feature(const_heap)]
119-
#![feature(const_nonnull_new)]
120-
#![feature(const_ptr_sub_ptr)]
121-
#![feature(const_raw_ptr_comparison)]
122-
#![feature(const_size_of_val)]
123-
#![feature(const_size_of_val_raw)]
124-
#![feature(const_sockaddr_setters)]
125-
#![feature(const_swap)]
126-
#![feature(const_try)]
127-
#![feature(const_type_id)]
128-
#![feature(const_type_name)]
129113
#![feature(const_typed_swap)]
130114
#![feature(core_intrinsics)]
131115
#![feature(coverage_attribute)]
@@ -165,10 +149,7 @@
165149
#![feature(cfg_target_has_atomic)]
166150
#![feature(cfg_target_has_atomic_equal_alignment)]
167151
#![feature(cfg_ub_checks)]
168-
#![feature(const_for)]
169-
#![feature(const_is_char_boundary)]
170152
#![feature(const_precise_live_drops)]
171-
#![feature(const_str_split_at)]
172153
#![feature(const_trait_impl)]
173154
#![feature(decl_macro)]
174155
#![feature(deprecated_suggestion)]

library/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, \

library/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 {

library/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

library/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

library/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) {

library/core/src/slice/mod.rs

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

library/core/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#![feature(const_align_of_val_raw)]
1717
#![feature(const_black_box)]
1818
#![feature(const_eval_select)]
19-
#![feature(const_heap)]
2019
#![feature(const_nonnull_new)]
2120
#![feature(const_swap)]
2221
#![feature(const_trait_impl)]

library/proc_macro/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
// This library is copied into rust-analyzer to allow loading rustc compiled proc macros.
2323
// Please avoid unstable features where possible to minimize the amount of changes necessary
2424
// to make it compile with rust-analyzer on stable.
25-
#![feature(rustc_allow_const_fn_unstable)]
2625
#![feature(staged_api)]
2726
#![feature(allow_internal_unstable)]
2827
#![feature(decl_macro)]

library/std/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,7 @@
409409
//
410410
// Only for const-ness:
411411
// tidy-alphabetical-start
412-
#![feature(const_collections_with_hasher)]
413412
#![feature(io_const_error)]
414-
#![feature(thread_local_internals)]
415413
// tidy-alphabetical-end
416414
//
417415
#![default_lib_allocator]

0 commit comments

Comments
 (0)