Skip to content

Commit 4a29e83

Browse files
committed
Auto merge of rust-lang#133728 - jhpratt:rollup-k1i60pg, r=jhpratt
Rollup of 4 pull requests Successful merges: - rust-lang#133589 (Remove `hir::ArrayLen`) - rust-lang#133672 (Remove a bunch of unnecessary const stability noise) - rust-lang#133678 (Stabilize `ptr::fn_addr_eq`) - rust-lang#133727 (Update mailmap) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 1c3d879 + d6f6f17 commit 4a29e83

File tree

15 files changed

+2
-50
lines changed

15 files changed

+2
-50
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) }

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)]

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)]

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

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/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,6 @@ pub fn addr_eq<T: ?Sized, U: ?Sized>(p: *const T, q: *const U) -> bool {
21112111
/// when compiled with optimization:
21122112
///
21132113
/// ```
2114-
/// # #![feature(ptr_fn_addr_eq)]
21152114
/// let f: fn(i32) -> i32 = |x| x;
21162115
/// let g: fn(i32) -> i32 = |x| x + 0; // different closure, different body
21172116
/// let h: fn(u32) -> u32 = |x| x + 0; // different signature too
@@ -2136,7 +2135,6 @@ pub fn addr_eq<T: ?Sized, U: ?Sized>(p: *const T, q: *const U) -> bool {
21362135
/// # Examples
21372136
///
21382137
/// ```
2139-
/// #![feature(ptr_fn_addr_eq)]
21402138
/// use std::ptr;
21412139
///
21422140
/// fn a() { println!("a"); }
@@ -2145,7 +2143,7 @@ pub fn addr_eq<T: ?Sized, U: ?Sized>(p: *const T, q: *const U) -> bool {
21452143
/// ```
21462144
///
21472145
/// [subtype]: https://doc.rust-lang.org/reference/subtyping.html
2148-
#[unstable(feature = "ptr_fn_addr_eq", issue = "129322")]
2146+
#[stable(feature = "ptr_fn_addr_eq", since = "CURRENT_RUSTC_VERSION")]
21492147
#[inline(always)]
21502148
#[must_use = "function pointer comparison produces a value"]
21512149
pub fn fn_addr_eq<T: FnPtr, U: FnPtr>(f: T, g: U) -> bool {

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]> {

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)]

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)]

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)