Skip to content

Commit 18514dd

Browse files
committed
get rid of a whole bunch of unnecessary rustc_const_unstable attributes
1 parent a8e1186 commit 18514dd

File tree

22 files changed

+0
-103
lines changed

22 files changed

+0
-103
lines changed

Diff for: library/core/src/array/iter.rs

-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ impl<T, const N: usize> IntoIter<T, N> {
136136
/// assert_eq!(r.collect::<Vec<_>>(), vec![10, 11, 12, 13, 14, 15]);
137137
/// ```
138138
#[unstable(feature = "array_into_iter_constructors", issue = "91583")]
139-
#[rustc_const_unstable(feature = "const_array_into_iter_constructors", issue = "91583")]
140139
pub const unsafe fn new_unchecked(
141140
buffer: [MaybeUninit<T>; N],
142141
initialized: Range<usize>,
@@ -199,7 +198,6 @@ impl<T, const N: usize> IntoIter<T, N> {
199198
/// assert_eq!(get_bytes(false).collect::<Vec<_>>(), vec![]);
200199
/// ```
201200
#[unstable(feature = "array_into_iter_constructors", issue = "91583")]
202-
#[rustc_const_unstable(feature = "const_array_into_iter_constructors", issue = "91583")]
203201
pub const fn empty() -> Self {
204202
let buffer = [const { MaybeUninit::uninit() }; N];
205203
let initialized = 0..0;

Diff for: library/core/src/char/methods.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1515,7 +1515,6 @@ impl char {
15151515
/// ```
15161516
#[must_use]
15171517
#[unstable(feature = "is_ascii_octdigit", issue = "101288")]
1518-
#[rustc_const_unstable(feature = "is_ascii_octdigit", issue = "101288")]
15191518
#[inline]
15201519
pub const fn is_ascii_octdigit(&self) -> bool {
15211520
matches!(*self, '0'..='7')

Diff for: library/core/src/lib.rs

-5
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@
115115
#![feature(const_align_offset)]
116116
#![feature(const_alloc_layout)]
117117
#![feature(const_arguments_as_str)]
118-
#![feature(const_array_into_iter_constructors)]
119-
#![feature(const_bigint_helper_methods)]
120118
#![feature(const_black_box)]
121119
#![feature(const_char_encode_utf16)]
122120
#![feature(const_eval_select)]
@@ -125,7 +123,6 @@
125123
#![feature(const_hash)]
126124
#![feature(const_heap)]
127125
#![feature(const_nonnull_new)]
128-
#![feature(const_num_midpoint)]
129126
#![feature(const_option_ext)]
130127
#![feature(const_pin_2)]
131128
#![feature(const_pointer_is_aligned)]
@@ -135,7 +132,6 @@
135132
#![feature(const_size_of_val)]
136133
#![feature(const_size_of_val_raw)]
137134
#![feature(const_sockaddr_setters)]
138-
#![feature(const_strict_overflow_ops)]
139135
#![feature(const_swap)]
140136
#![feature(const_try)]
141137
#![feature(const_type_id)]
@@ -167,7 +163,6 @@
167163
#![feature(unchecked_neg)]
168164
#![feature(unchecked_shifts)]
169165
#![feature(utf16_extra)]
170-
#![feature(utf16_extra_const)]
171166
#![feature(variant_count)]
172167
// tidy-alphabetical-end
173168
//

Diff for: library/core/src/mem/maybe_uninit.rs

-6
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ impl<T> MaybeUninit<T> {
338338
/// let data = read(&mut buf);
339339
/// ```
340340
#[unstable(feature = "maybe_uninit_uninit_array", issue = "96097")]
341-
#[rustc_const_unstable(feature = "const_maybe_uninit_uninit_array", issue = "96097")]
342341
#[must_use]
343342
#[inline(always)]
344343
pub const fn uninit_array<const N: usize>() -> [Self; N] {
@@ -949,7 +948,6 @@ impl<T> MaybeUninit<T> {
949948
/// assert_eq!(array, [0, 1, 2]);
950949
/// ```
951950
#[unstable(feature = "maybe_uninit_array_assume_init", issue = "96097")]
952-
#[rustc_const_unstable(feature = "const_maybe_uninit_array_assume_init", issue = "96097")]
953951
#[inline(always)]
954952
#[track_caller]
955953
pub const unsafe fn array_assume_init<const N: usize>(array: [Self; N]) -> [T; N] {
@@ -976,7 +974,6 @@ impl<T> MaybeUninit<T> {
976974
///
977975
/// [`assume_init_ref`]: MaybeUninit::assume_init_ref
978976
#[unstable(feature = "maybe_uninit_slice", issue = "63569")]
979-
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
980977
#[inline(always)]
981978
pub const unsafe fn slice_assume_init_ref(slice: &[Self]) -> &[T] {
982979
// SAFETY: casting `slice` to a `*const [T]` is safe since the caller guarantees that
@@ -998,7 +995,6 @@ impl<T> MaybeUninit<T> {
998995
///
999996
/// [`assume_init_mut`]: MaybeUninit::assume_init_mut
1000997
#[unstable(feature = "maybe_uninit_slice", issue = "63569")]
1001-
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
1002998
#[inline(always)]
1003999
pub const unsafe fn slice_assume_init_mut(slice: &mut [Self]) -> &mut [T] {
10041000
// SAFETY: similar to safety notes for `slice_get_ref`, but we have a
@@ -1008,15 +1004,13 @@ impl<T> MaybeUninit<T> {
10081004

10091005
/// Gets a pointer to the first element of the array.
10101006
#[unstable(feature = "maybe_uninit_slice", issue = "63569")]
1011-
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
10121007
#[inline(always)]
10131008
pub const fn slice_as_ptr(this: &[MaybeUninit<T>]) -> *const T {
10141009
this.as_ptr() as *const T
10151010
}
10161011

10171012
/// Gets a mutable pointer to the first element of the array.
10181013
#[unstable(feature = "maybe_uninit_slice", issue = "63569")]
1019-
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
10201014
#[inline(always)]
10211015
pub const fn slice_as_mut_ptr(this: &mut [MaybeUninit<T>]) -> *mut T {
10221016
this.as_mut_ptr() as *mut T

Diff for: library/core/src/net/ip_addr.rs

-1
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ impl IpAddr {
373373
/// assert_eq!(IpAddr::V6(Ipv6Addr::new(0x2001, 0x2, 0, 0, 0, 0, 0, 0)).is_benchmarking(), true);
374374
/// ```
375375
#[unstable(feature = "ip", issue = "27709")]
376-
#[rustc_const_unstable(feature = "const_ipv4", issue = "76205")]
377376
#[must_use]
378377
#[inline]
379378
pub const fn is_benchmarking(&self) -> bool {

Diff for: library/core/src/num/f32.rs

-2
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,6 @@ impl f32 {
748748
/// [`MAX`]: Self::MAX
749749
#[inline]
750750
#[unstable(feature = "float_next_up_down", issue = "91399")]
751-
#[rustc_const_unstable(feature = "float_next_up_down", issue = "91399")]
752751
pub const fn next_up(self) -> Self {
753752
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
754753
// denormals to zero. This is in general unsound and unsupported, but here
@@ -797,7 +796,6 @@ impl f32 {
797796
/// [`MAX`]: Self::MAX
798797
#[inline]
799798
#[unstable(feature = "float_next_up_down", issue = "91399")]
800-
#[rustc_const_unstable(feature = "float_next_up_down", issue = "91399")]
801799
pub const fn next_down(self) -> Self {
802800
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
803801
// denormals to zero. This is in general unsound and unsupported, but here

Diff for: library/core/src/num/f64.rs

-2
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,6 @@ impl f64 {
765765
/// [`MAX`]: Self::MAX
766766
#[inline]
767767
#[unstable(feature = "float_next_up_down", issue = "91399")]
768-
#[rustc_const_unstable(feature = "float_next_up_down", issue = "91399")]
769768
pub const fn next_up(self) -> Self {
770769
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
771770
// denormals to zero. This is in general unsound and unsupported, but here
@@ -814,7 +813,6 @@ impl f64 {
814813
/// [`MAX`]: Self::MAX
815814
#[inline]
816815
#[unstable(feature = "float_next_up_down", issue = "91399")]
817-
#[rustc_const_unstable(feature = "float_next_up_down", issue = "91399")]
818816
pub const fn next_down(self) -> Self {
819817
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
820818
// denormals to zero. This is in general unsound and unsupported, but here

Diff for: library/core/src/num/int_macros.rs

-16
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,6 @@ macro_rules! int_impl {
477477
#[doc = concat!("let _ = (", stringify!($SelfT), "::MAX - 2).strict_add(3);")]
478478
/// ```
479479
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
480-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
481480
#[must_use = "this returns the result of the operation, \
482481
without modifying the original"]
483482
#[inline]
@@ -573,7 +572,6 @@ macro_rules! int_impl {
573572
#[doc = concat!("let _ = (", stringify!($SelfT), "::MAX - 2).strict_add_unsigned(3);")]
574573
/// ```
575574
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
576-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
577575
#[must_use = "this returns the result of the operation, \
578576
without modifying the original"]
579577
#[inline]
@@ -629,7 +627,6 @@ macro_rules! int_impl {
629627
#[doc = concat!("let _ = (", stringify!($SelfT), "::MIN + 2).strict_sub(3);")]
630628
/// ```
631629
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
632-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
633630
#[must_use = "this returns the result of the operation, \
634631
without modifying the original"]
635632
#[inline]
@@ -725,7 +722,6 @@ macro_rules! int_impl {
725722
#[doc = concat!("let _ = (", stringify!($SelfT), "::MIN + 2).strict_sub_unsigned(3);")]
726723
/// ```
727724
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
728-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
729725
#[must_use = "this returns the result of the operation, \
730726
without modifying the original"]
731727
#[inline]
@@ -781,7 +777,6 @@ macro_rules! int_impl {
781777
#[doc = concat!("let _ = ", stringify!($SelfT), "::MAX.strict_mul(2);")]
782778
/// ```
783779
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
784-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
785780
#[must_use = "this returns the result of the operation, \
786781
without modifying the original"]
787782
#[inline]
@@ -895,7 +890,6 @@ macro_rules! int_impl {
895890
#[doc = concat!("let _ = (1", stringify!($SelfT), ").strict_div(0);")]
896891
/// ```
897892
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
898-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
899893
#[must_use = "this returns the result of the operation, \
900894
without modifying the original"]
901895
#[inline]
@@ -969,7 +963,6 @@ macro_rules! int_impl {
969963
#[doc = concat!("let _ = (1", stringify!($SelfT), ").strict_div_euclid(0);")]
970964
/// ```
971965
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
972-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
973966
#[must_use = "this returns the result of the operation, \
974967
without modifying the original"]
975968
#[inline]
@@ -1042,7 +1035,6 @@ macro_rules! int_impl {
10421035
#[doc = concat!("let _ = ", stringify!($SelfT), "::MIN.strict_rem(-1);")]
10431036
/// ```
10441037
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
1045-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
10461038
#[must_use = "this returns the result of the operation, \
10471039
without modifying the original"]
10481040
#[inline]
@@ -1115,7 +1107,6 @@ macro_rules! int_impl {
11151107
#[doc = concat!("let _ = ", stringify!($SelfT), "::MIN.strict_rem_euclid(-1);")]
11161108
/// ```
11171109
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
1118-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
11191110
#[must_use = "this returns the result of the operation, \
11201111
without modifying the original"]
11211112
#[inline]
@@ -1203,7 +1194,6 @@ macro_rules! int_impl {
12031194
#[doc = concat!("let _ = ", stringify!($SelfT), "::MIN.strict_neg();")]
12041195
///
12051196
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
1206-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
12071197
#[must_use = "this returns the result of the operation, \
12081198
without modifying the original"]
12091199
#[inline]
@@ -1267,7 +1257,6 @@ macro_rules! int_impl {
12671257
#[doc = concat!("let _ = 0x1", stringify!($SelfT), ".strict_shl(129);")]
12681258
/// ```
12691259
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
1270-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
12711260
#[must_use = "this returns the result of the operation, \
12721261
without modifying the original"]
12731262
#[inline]
@@ -1393,7 +1382,6 @@ macro_rules! int_impl {
13931382
#[doc = concat!("let _ = 0x10", stringify!($SelfT), ".strict_shr(128);")]
13941383
/// ```
13951384
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
1396-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
13971385
#[must_use = "this returns the result of the operation, \
13981386
without modifying the original"]
13991387
#[inline]
@@ -1521,7 +1509,6 @@ macro_rules! int_impl {
15211509
#[doc = concat!("let _ = ", stringify!($SelfT), "::MIN.strict_abs();")]
15221510
/// ```
15231511
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
1524-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
15251512
#[must_use = "this returns the result of the operation, \
15261513
without modifying the original"]
15271514
#[inline]
@@ -1596,7 +1583,6 @@ macro_rules! int_impl {
15961583
#[doc = concat!("let _ = ", stringify!($SelfT), "::MAX.strict_pow(2);")]
15971584
/// ```
15981585
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
1599-
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
16001586
#[must_use = "this returns the result of the operation, \
16011587
without modifying the original"]
16021588
#[inline]
@@ -2370,7 +2356,6 @@ macro_rules! int_impl {
23702356
/// assert_eq!((sum1, sum0), (6, 8));
23712357
/// ```
23722358
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
2373-
#[rustc_const_unstable(feature = "const_bigint_helper_methods", issue = "85532")]
23742359
#[must_use = "this returns the result of the operation, \
23752360
without modifying the original"]
23762361
#[inline]
@@ -2478,7 +2463,6 @@ macro_rules! int_impl {
24782463
#[doc = concat!("assert_eq!((diff1, diff0), (10, ", stringify!($UnsignedT), "::MAX));")]
24792464
/// ```
24802465
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
2481-
#[rustc_const_unstable(feature = "const_bigint_helper_methods", issue = "85532")]
24822466
#[must_use = "this returns the result of the operation, \
24832467
without modifying the original"]
24842468
#[inline]

Diff for: library/core/src/num/mod.rs

-8
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ macro_rules! midpoint_impl {
114114
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".midpoint(4), 2);")]
115115
/// ```
116116
#[unstable(feature = "num_midpoint", issue = "110840")]
117-
#[rustc_const_unstable(feature = "const_num_midpoint", issue = "110840")]
118117
#[must_use = "this returns the result of the operation, \
119118
without modifying the original"]
120119
#[inline]
@@ -142,7 +141,6 @@ macro_rules! midpoint_impl {
142141
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".midpoint(7), 3);")]
143142
/// ```
144143
#[unstable(feature = "num_midpoint", issue = "110840")]
145-
#[rustc_const_unstable(feature = "const_num_midpoint", issue = "110840")]
146144
#[must_use = "this returns the result of the operation, \
147145
without modifying the original"]
148146
#[inline]
@@ -170,7 +168,6 @@ macro_rules! midpoint_impl {
170168
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".midpoint(4), 2);")]
171169
/// ```
172170
#[unstable(feature = "num_midpoint", issue = "110840")]
173-
#[rustc_const_unstable(feature = "const_num_midpoint", issue = "110840")]
174171
#[must_use = "this returns the result of the operation, \
175172
without modifying the original"]
176173
#[inline]
@@ -196,7 +193,6 @@ macro_rules! midpoint_impl {
196193
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".midpoint(7), 3);")]
197194
/// ```
198195
#[unstable(feature = "num_midpoint", issue = "110840")]
199-
#[rustc_const_unstable(feature = "const_num_midpoint", issue = "110840")]
200196
#[must_use = "this returns the result of the operation, \
201197
without modifying the original"]
202198
#[inline]
@@ -229,7 +225,6 @@ macro_rules! widening_impl {
229225
/// assert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));
230226
/// ```
231227
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
232-
#[rustc_const_unstable(feature = "const_bigint_helper_methods", issue = "85532")]
233228
#[must_use = "this returns the result of the operation, \
234229
without modifying the original"]
235230
#[inline]
@@ -320,7 +315,6 @@ macro_rules! widening_impl {
320315
/// );
321316
/// ```
322317
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
323-
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
324318
#[must_use = "this returns the result of the operation, \
325319
without modifying the original"]
326320
#[inline]
@@ -915,7 +909,6 @@ impl u8 {
915909
/// ```
916910
#[must_use]
917911
#[unstable(feature = "is_ascii_octdigit", issue = "101288")]
918-
#[rustc_const_unstable(feature = "is_ascii_octdigit", issue = "101288")]
919912
#[inline]
920913
pub const fn is_ascii_octdigit(&self) -> bool {
921914
matches!(*self, b'0'..=b'7')
@@ -1195,7 +1188,6 @@ impl u16 {
11951188
/// ```
11961189
#[must_use]
11971190
#[unstable(feature = "utf16_extra", issue = "94919")]
1198-
#[rustc_const_unstable(feature = "utf16_extra_const", issue = "94919")]
11991191
#[inline]
12001192
pub const fn is_utf16_surrogate(self) -> bool {
12011193
matches!(self, 0xD800..=0xDFFF)

Diff for: library/core/src/num/nonzero.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1474,8 +1474,6 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
14741474
/// # }
14751475
/// ```
14761476
#[unstable(feature = "num_midpoint", issue = "110840")]
1477-
#[rustc_const_unstable(feature = "const_num_midpoint", issue = "110840")]
1478-
#[rustc_allow_const_fn_unstable(const_num_midpoint)]
14791477
#[must_use = "this returns the result of the operation, \
14801478
without modifying the original"]
14811479
#[inline]

0 commit comments

Comments
 (0)