get rid of a whole bunch of unnecessary rustc_const_unstable attributes

This commit is contained in:
Ralf Jung 2024-11-02 09:59:55 +01:00
parent ef972a3466
commit 66351a6184
22 changed files with 0 additions and 106 deletions

View File

@ -136,7 +136,6 @@ impl<T, const N: usize> IntoIter<T, N> {
/// assert_eq!(r.collect::<Vec<_>>(), vec![10, 11, 12, 13, 14, 15]);
/// ```
#[unstable(feature = "array_into_iter_constructors", issue = "91583")]
#[rustc_const_unstable(feature = "const_array_into_iter_constructors", issue = "91583")]
pub const unsafe fn new_unchecked(
buffer: [MaybeUninit<T>; N],
initialized: Range<usize>,
@ -199,7 +198,6 @@ impl<T, const N: usize> IntoIter<T, N> {
/// assert_eq!(get_bytes(false).collect::<Vec<_>>(), vec![]);
/// ```
#[unstable(feature = "array_into_iter_constructors", issue = "91583")]
#[rustc_const_unstable(feature = "const_array_into_iter_constructors", issue = "91583")]
pub const fn empty() -> Self {
let buffer = [const { MaybeUninit::uninit() }; N];
let initialized = 0..0;

View File

@ -1515,7 +1515,6 @@ pub const fn is_ascii_digit(&self) -> bool {
/// ```
#[must_use]
#[unstable(feature = "is_ascii_octdigit", issue = "101288")]
#[rustc_const_unstable(feature = "is_ascii_octdigit", issue = "101288")]
#[inline]
pub const fn is_ascii_octdigit(&self) -> bool {
matches!(*self, '0'..='7')

View File

@ -115,8 +115,6 @@
#![feature(const_align_offset)]
#![feature(const_alloc_layout)]
#![feature(const_arguments_as_str)]
#![feature(const_array_into_iter_constructors)]
#![feature(const_bigint_helper_methods)]
#![feature(const_black_box)]
#![feature(const_char_encode_utf16)]
#![feature(const_eval_select)]
@ -125,7 +123,6 @@
#![feature(const_hash)]
#![feature(const_heap)]
#![feature(const_nonnull_new)]
#![feature(const_num_midpoint)]
#![feature(const_option_ext)]
#![feature(const_pin_2)]
#![feature(const_pointer_is_aligned)]
@ -135,7 +132,6 @@
#![feature(const_size_of_val)]
#![feature(const_size_of_val_raw)]
#![feature(const_sockaddr_setters)]
#![feature(const_strict_overflow_ops)]
#![feature(const_swap)]
#![feature(const_try)]
#![feature(const_type_id)]
@ -167,7 +163,6 @@
#![feature(unchecked_neg)]
#![feature(unchecked_shifts)]
#![feature(utf16_extra)]
#![feature(utf16_extra_const)]
#![feature(variant_count)]
// tidy-alphabetical-end
//

View File

@ -338,7 +338,6 @@ pub const fn uninit() -> MaybeUninit<T> {
/// let data = read(&mut buf);
/// ```
#[unstable(feature = "maybe_uninit_uninit_array", issue = "96097")]
#[rustc_const_unstable(feature = "const_maybe_uninit_uninit_array", issue = "96097")]
#[must_use]
#[inline(always)]
pub const fn uninit_array<const N: usize>() -> [Self; N] {
@ -946,7 +945,6 @@ pub unsafe fn assume_init_drop(&mut self) {
/// assert_eq!(array, [0, 1, 2]);
/// ```
#[unstable(feature = "maybe_uninit_array_assume_init", issue = "96097")]
#[rustc_const_unstable(feature = "const_maybe_uninit_array_assume_init", issue = "96097")]
#[inline(always)]
#[track_caller]
pub const unsafe fn array_assume_init<const N: usize>(array: [Self; N]) -> [T; N] {
@ -973,7 +971,6 @@ pub unsafe fn assume_init_drop(&mut self) {
///
/// [`assume_init_ref`]: MaybeUninit::assume_init_ref
#[unstable(feature = "maybe_uninit_slice", issue = "63569")]
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
#[inline(always)]
pub const unsafe fn slice_assume_init_ref(slice: &[Self]) -> &[T] {
// SAFETY: casting `slice` to a `*const [T]` is safe since the caller guarantees that
@ -995,7 +992,6 @@ pub unsafe fn assume_init_drop(&mut self) {
///
/// [`assume_init_mut`]: MaybeUninit::assume_init_mut
#[unstable(feature = "maybe_uninit_slice", issue = "63569")]
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
#[inline(always)]
pub const unsafe fn slice_assume_init_mut(slice: &mut [Self]) -> &mut [T] {
// SAFETY: similar to safety notes for `slice_get_ref`, but we have a
@ -1005,7 +1001,6 @@ pub unsafe fn assume_init_drop(&mut self) {
/// Gets a pointer to the first element of the array.
#[unstable(feature = "maybe_uninit_slice", issue = "63569")]
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
#[inline(always)]
pub const fn slice_as_ptr(this: &[MaybeUninit<T>]) -> *const T {
this.as_ptr() as *const T
@ -1013,7 +1008,6 @@ pub const fn slice_as_ptr(this: &[MaybeUninit<T>]) -> *const T {
/// Gets a mutable pointer to the first element of the array.
#[unstable(feature = "maybe_uninit_slice", issue = "63569")]
#[rustc_const_unstable(feature = "maybe_uninit_slice", issue = "63569")]
#[inline(always)]
pub const fn slice_as_mut_ptr(this: &mut [MaybeUninit<T>]) -> *mut T {
this.as_mut_ptr() as *mut T

View File

@ -373,7 +373,6 @@ pub const fn is_documentation(&self) -> bool {
/// assert_eq!(IpAddr::V6(Ipv6Addr::new(0x2001, 0x2, 0, 0, 0, 0, 0, 0)).is_benchmarking(), true);
/// ```
#[unstable(feature = "ip", issue = "27709")]
#[rustc_const_unstable(feature = "const_ipv4", issue = "76205")]
#[must_use]
#[inline]
pub const fn is_benchmarking(&self) -> bool {

View File

@ -748,7 +748,6 @@ pub const fn is_sign_negative(self) -> bool {
/// [`MAX`]: Self::MAX
#[inline]
#[unstable(feature = "float_next_up_down", issue = "91399")]
#[rustc_const_unstable(feature = "float_next_up_down", issue = "91399")]
pub const fn next_up(self) -> Self {
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
// denormals to zero. This is in general unsound and unsupported, but here
@ -797,7 +796,6 @@ pub const fn next_up(self) -> Self {
/// [`MAX`]: Self::MAX
#[inline]
#[unstable(feature = "float_next_up_down", issue = "91399")]
#[rustc_const_unstable(feature = "float_next_up_down", issue = "91399")]
pub const fn next_down(self) -> Self {
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
// denormals to zero. This is in general unsound and unsupported, but here

View File

@ -765,7 +765,6 @@ pub fn is_negative(self) -> bool {
/// [`MAX`]: Self::MAX
#[inline]
#[unstable(feature = "float_next_up_down", issue = "91399")]
#[rustc_const_unstable(feature = "float_next_up_down", issue = "91399")]
pub const fn next_up(self) -> Self {
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
// denormals to zero. This is in general unsound and unsupported, but here
@ -814,7 +813,6 @@ pub const fn next_up(self) -> Self {
/// [`MAX`]: Self::MAX
#[inline]
#[unstable(feature = "float_next_up_down", issue = "91399")]
#[rustc_const_unstable(feature = "float_next_up_down", issue = "91399")]
pub const fn next_down(self) -> Self {
// Some targets violate Rust's assumption of IEEE semantics, e.g. by flushing
// denormals to zero. This is in general unsound and unsupported, but here

View File

@ -477,7 +477,6 @@ pub const fn checked_add(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = (", stringify!($SelfT), "::MAX - 2).strict_add(3);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -573,7 +572,6 @@ pub const fn checked_add_unsigned(self, rhs: $UnsignedT) -> Option<Self> {
#[doc = concat!("let _ = (", stringify!($SelfT), "::MAX - 2).strict_add_unsigned(3);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -629,7 +627,6 @@ pub const fn checked_sub(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = (", stringify!($SelfT), "::MIN + 2).strict_sub(3);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -725,7 +722,6 @@ pub const fn checked_sub_unsigned(self, rhs: $UnsignedT) -> Option<Self> {
#[doc = concat!("let _ = (", stringify!($SelfT), "::MIN + 2).strict_sub_unsigned(3);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -781,7 +777,6 @@ pub const fn checked_mul(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = ", stringify!($SelfT), "::MAX.strict_mul(2);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -895,7 +890,6 @@ pub const fn checked_div(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = (1", stringify!($SelfT), ").strict_div(0);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -969,7 +963,6 @@ pub const fn checked_div_euclid(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = (1", stringify!($SelfT), ").strict_div_euclid(0);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1042,7 +1035,6 @@ pub const fn checked_rem(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = ", stringify!($SelfT), "::MIN.strict_rem(-1);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1115,7 +1107,6 @@ pub const fn checked_rem_euclid(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = ", stringify!($SelfT), "::MIN.strict_rem_euclid(-1);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1203,7 +1194,6 @@ pub const fn checked_neg(self) -> Option<Self> {
#[doc = concat!("let _ = ", stringify!($SelfT), "::MIN.strict_neg();")]
///
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1266,7 +1256,6 @@ pub const fn checked_shl(self, rhs: u32) -> Option<Self> {
#[doc = concat!("let _ = 0x1", stringify!($SelfT), ".strict_shl(129);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1325,7 +1314,6 @@ pub const fn strict_shl(self, rhs: u32) -> Self {
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".unbounded_shl(129), 0);")]
/// ```
#[unstable(feature = "unbounded_shifts", issue = "129375")]
#[rustc_const_unstable(feature = "const_unbounded_shifts", issue = "129375")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1391,7 +1379,6 @@ pub const fn checked_shr(self, rhs: u32) -> Option<Self> {
#[doc = concat!("let _ = 0x10", stringify!($SelfT), ".strict_shr(128);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1452,7 +1439,6 @@ pub const fn strict_shr(self, rhs: u32) -> Self {
#[doc = concat!("assert_eq!(", stringify!($SelfT), "::MIN.unbounded_shr(129), -1);")]
/// ```
#[unstable(feature = "unbounded_shifts", issue = "129375")]
#[rustc_const_unstable(feature = "const_unbounded_shifts", issue = "129375")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1519,7 +1505,6 @@ pub const fn checked_abs(self) -> Option<Self> {
#[doc = concat!("let _ = ", stringify!($SelfT), "::MIN.strict_abs();")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1594,7 +1579,6 @@ pub const fn checked_pow(self, mut exp: u32) -> Option<Self> {
#[doc = concat!("let _ = ", stringify!($SelfT), "::MAX.strict_pow(2);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -2368,7 +2352,6 @@ pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) {
/// assert_eq!((sum1, sum0), (6, 8));
/// ```
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "const_bigint_helper_methods", issue = "85532")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -2476,7 +2459,6 @@ pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) {
#[doc = concat!("assert_eq!((diff1, diff0), (10, ", stringify!($UnsignedT), "::MAX));")]
/// ```
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "const_bigint_helper_methods", issue = "85532")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]

View File

@ -114,7 +114,6 @@ macro_rules! midpoint_impl {
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".midpoint(4), 2);")]
/// ```
#[unstable(feature = "num_midpoint", issue = "110840")]
#[rustc_const_unstable(feature = "const_num_midpoint", issue = "110840")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -142,7 +141,6 @@ pub const fn midpoint(self, rhs: $SelfT) -> $SelfT {
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".midpoint(7), 3);")]
/// ```
#[unstable(feature = "num_midpoint", issue = "110840")]
#[rustc_const_unstable(feature = "const_num_midpoint", issue = "110840")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -170,7 +168,6 @@ pub const fn midpoint(self, rhs: Self) -> Self {
#[doc = concat!("assert_eq!(1", stringify!($SelfT), ".midpoint(4), 2);")]
/// ```
#[unstable(feature = "num_midpoint", issue = "110840")]
#[rustc_const_unstable(feature = "const_num_midpoint", issue = "110840")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -196,7 +193,6 @@ pub const fn midpoint(self, rhs: $SelfT) -> $SelfT {
#[doc = concat!("assert_eq!(0", stringify!($SelfT), ".midpoint(7), 3);")]
/// ```
#[unstable(feature = "num_midpoint", issue = "110840")]
#[rustc_const_unstable(feature = "const_num_midpoint", issue = "110840")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -229,7 +225,6 @@ macro_rules! widening_impl {
/// assert_eq!(1_000_000_000u32.widening_mul(10), (1410065408, 2));
/// ```
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "const_bigint_helper_methods", issue = "85532")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -320,7 +315,6 @@ pub const fn widening_mul(self, rhs: Self) -> (Self, Self) {
/// );
/// ```
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "bigint_helper_methods", issue = "85532")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -915,7 +909,6 @@ pub const fn is_ascii_digit(&self) -> bool {
/// ```
#[must_use]
#[unstable(feature = "is_ascii_octdigit", issue = "101288")]
#[rustc_const_unstable(feature = "is_ascii_octdigit", issue = "101288")]
#[inline]
pub const fn is_ascii_octdigit(&self) -> bool {
matches!(*self, b'0'..=b'7')
@ -1195,7 +1188,6 @@ impl u16 {
/// ```
#[must_use]
#[unstable(feature = "utf16_extra", issue = "94919")]
#[rustc_const_unstable(feature = "utf16_extra_const", issue = "94919")]
#[inline]
pub const fn is_utf16_surrogate(self) -> bool {
matches!(self, 0xD800..=0xDFFF)

View File

@ -1474,7 +1474,6 @@ pub const fn ilog10(self) -> u32 {
/// # }
/// ```
#[unstable(feature = "num_midpoint", issue = "110840")]
#[rustc_const_unstable(feature = "const_num_midpoint", issue = "110840")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]

View File

@ -524,7 +524,6 @@ pub const fn checked_add(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = (", stringify!($SelfT), "::MAX - 2).strict_add(3);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -626,7 +625,6 @@ pub const fn checked_add_signed(self, rhs: $SignedT) -> Option<Self> {
#[doc = concat!("let _ = (", stringify!($SelfT), "::MAX - 2).strict_add_signed(3);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -691,7 +689,6 @@ pub const fn checked_sub(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = 0", stringify!($SelfT), ".strict_sub(1);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -873,7 +870,6 @@ pub const fn checked_mul(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = ", stringify!($SelfT), "::MAX.strict_mul(2);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -975,7 +971,6 @@ pub const fn checked_div(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = (1", stringify!($SelfT), ").strict_div(0);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline(always)]
@ -1035,7 +1030,6 @@ pub const fn checked_div_euclid(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = (1", stringify!($SelfT), ").strict_div_euclid(0);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline(always)]
@ -1097,7 +1091,6 @@ pub const fn checked_rem(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = 5", stringify!($SelfT), ".strict_rem(0);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline(always)]
@ -1159,7 +1152,6 @@ pub const fn checked_rem_euclid(self, rhs: Self) -> Option<Self> {
#[doc = concat!("let _ = 5", stringify!($SelfT), ".strict_rem_euclid(0);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline(always)]
@ -1392,7 +1384,6 @@ pub const fn checked_neg(self) -> Option<Self> {
#[doc = concat!("let _ = 1", stringify!($SelfT), ".strict_neg();")]
///
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1455,7 +1446,6 @@ pub const fn checked_shl(self, rhs: u32) -> Option<Self> {
#[doc = concat!("let _ = 0x10", stringify!($SelfT), ".strict_shl(129);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1514,7 +1504,6 @@ pub const fn strict_shl(self, rhs: u32) -> Self {
#[doc = concat!("assert_eq!(0x1", stringify!($SelfT), ".unbounded_shl(129), 0);")]
/// ```
#[unstable(feature = "unbounded_shifts", issue = "129375")]
#[rustc_const_unstable(feature = "const_unbounded_shifts", issue = "129375")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1580,7 +1569,6 @@ pub const fn checked_shr(self, rhs: u32) -> Option<Self> {
#[doc = concat!("let _ = 0x10", stringify!($SelfT), ".strict_shr(129);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1639,7 +1627,6 @@ pub const fn strict_shr(self, rhs: u32) -> Self {
#[doc = concat!("assert_eq!(0x10", stringify!($SelfT), ".unbounded_shr(129), 0);")]
/// ```
#[unstable(feature = "unbounded_shifts", issue = "129375")]
#[rustc_const_unstable(feature = "const_unbounded_shifts", issue = "129375")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1714,7 +1701,6 @@ pub const fn checked_pow(self, mut exp: u32) -> Option<Self> {
#[doc = concat!("let _ = ", stringify!($SelfT), "::MAX.strict_pow(2);")]
/// ```
#[unstable(feature = "strict_overflow_ops", issue = "118260")]
#[rustc_const_unstable(feature = "const_strict_overflow_ops", issue = "118260")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -2290,7 +2276,6 @@ pub const fn overflowing_add(self, rhs: Self) -> (Self, bool) {
/// assert_eq!((sum1, sum0), (9, 6));
/// ```
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "const_bigint_helper_methods", issue = "85532")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -2382,7 +2367,6 @@ pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool) {
#[doc = concat!("assert_eq!((diff1, diff0), (3, ", stringify!($SelfT), "::MAX));")]
/// ```
#[unstable(feature = "bigint_helper_methods", issue = "85532")]
#[rustc_const_unstable(feature = "const_bigint_helper_methods", issue = "85532")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]

View File

@ -240,7 +240,6 @@ pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self {
///
/// The pointer can be later reconstructed with [`from_raw_parts`].
#[unstable(feature = "ptr_metadata", issue = "81513")]
#[rustc_const_unstable(feature = "ptr_metadata", issue = "81513")]
#[inline]
pub const fn to_raw_parts(self) -> (*const (), <T as super::Pointee>::Metadata) {
(self.cast(), metadata(self))
@ -316,7 +315,6 @@ pub const fn to_raw_parts(self) -> (*const (), <T as super::Pointee>::Metadata)
/// ```
// FIXME: mention it in the docs for `as_ref` and `as_uninit_ref` once stabilized.
#[unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
#[rustc_const_unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
#[inline]
#[must_use]
pub const unsafe fn as_ref_unchecked<'a>(self) -> &'a T {
@ -1714,7 +1712,6 @@ pub const fn is_empty(self) -> bool {
/// ```
#[inline]
#[unstable(feature = "slice_ptr_get", issue = "74265")]
#[rustc_const_unstable(feature = "slice_ptr_get", issue = "74265")]
pub const fn as_ptr(self) -> *const T {
self as *const T
}
@ -1814,7 +1811,6 @@ pub unsafe fn get_unchecked<I>(self, index: I) -> *const I::Output
/// ```
#[inline]
#[unstable(feature = "array_ptr_get", issue = "119834")]
#[rustc_const_unstable(feature = "array_ptr_get", issue = "119834")]
pub const fn as_ptr(self) -> *const T {
self as *const T
}
@ -1832,7 +1828,6 @@ pub const fn as_ptr(self) -> *const T {
/// ```
#[inline]
#[unstable(feature = "array_ptr_get", issue = "119834")]
#[rustc_const_unstable(feature = "array_ptr_get", issue = "119834")]
pub const fn as_slice(self) -> *const [T] {
self
}

View File

@ -225,7 +225,6 @@ pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self {
///
/// The pointer can be later reconstructed with [`from_raw_parts_mut`].
#[unstable(feature = "ptr_metadata", issue = "81513")]
#[rustc_const_unstable(feature = "ptr_metadata", issue = "81513")]
#[inline]
pub const fn to_raw_parts(self) -> (*mut (), <T as super::Pointee>::Metadata) {
(self.cast(), super::metadata(self))
@ -306,7 +305,6 @@ pub const fn to_raw_parts(self) -> (*mut (), <T as super::Pointee>::Metadata) {
/// ```
// FIXME: mention it in the docs for `as_ref` and `as_uninit_ref` once stabilized.
#[unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
#[rustc_const_unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
#[inline]
#[must_use]
pub const unsafe fn as_ref_unchecked<'a>(self) -> &'a T {
@ -659,7 +657,6 @@ pub fn mask(self, mask: usize) -> *mut T {
/// ```
// FIXME: mention it in the docs for `as_mut` and `as_uninit_mut` once stabilized.
#[unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
#[rustc_const_unstable(feature = "ptr_as_ref_unchecked", issue = "122034")]
#[inline]
#[must_use]
pub const unsafe fn as_mut_unchecked<'a>(self) -> &'a mut T {
@ -2059,7 +2056,6 @@ pub unsafe fn split_at_mut_unchecked(self, mid: usize) -> (*mut [T], *mut [T]) {
/// ```
#[inline(always)]
#[unstable(feature = "slice_ptr_get", issue = "74265")]
#[rustc_const_unstable(feature = "slice_ptr_get", issue = "74265")]
pub const fn as_mut_ptr(self) -> *mut T {
self as *mut T
}
@ -2215,7 +2211,6 @@ pub unsafe fn get_unchecked_mut<I>(self, index: I) -> *mut I::Output
/// ```
#[inline]
#[unstable(feature = "array_ptr_get", issue = "119834")]
#[rustc_const_unstable(feature = "array_ptr_get", issue = "119834")]
pub const fn as_mut_ptr(self) -> *mut T {
self as *mut T
}
@ -2236,7 +2231,6 @@ pub const fn as_mut_ptr(self) -> *mut T {
/// ```
#[inline]
#[unstable(feature = "array_ptr_get", issue = "119834")]
#[rustc_const_unstable(feature = "array_ptr_get", issue = "119834")]
pub const fn as_mut_slice(self) -> *mut [T] {
self
}

View File

@ -131,7 +131,6 @@ pub const fn dangling() -> Self {
#[inline]
#[must_use]
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
pub const unsafe fn as_uninit_ref<'a>(self) -> &'a MaybeUninit<T> {
// SAFETY: the caller must guarantee that `self` meets all the
// requirements for a reference.
@ -155,7 +154,6 @@ pub const fn dangling() -> Self {
#[inline]
#[must_use]
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
pub const unsafe fn as_uninit_mut<'a>(self) -> &'a mut MaybeUninit<T> {
// SAFETY: the caller must guarantee that `self` meets all the
// requirements for a reference.
@ -230,7 +228,6 @@ pub const fn new(ptr: *mut T) -> Option<Self> {
/// Converts a reference to a `NonNull` pointer.
#[unstable(feature = "non_null_from_ref", issue = "130823")]
#[rustc_const_unstable(feature = "non_null_from_ref", issue = "130823")]
#[inline]
pub const fn from_ref(r: &T) -> Self {
// SAFETY: A reference cannot be null.
@ -239,7 +236,6 @@ pub const fn from_ref(r: &T) -> Self {
/// Converts a mutable reference to a `NonNull` pointer.
#[unstable(feature = "non_null_from_ref", issue = "130823")]
#[rustc_const_unstable(feature = "non_null_from_ref", issue = "130823")]
#[inline]
pub const fn from_mut(r: &mut T) -> Self {
// SAFETY: A mutable reference cannot be null.
@ -253,7 +249,6 @@ pub const fn from_mut(r: &mut T) -> Self {
///
/// [`std::ptr::from_raw_parts`]: crate::ptr::from_raw_parts
#[unstable(feature = "ptr_metadata", issue = "81513")]
#[rustc_const_unstable(feature = "ptr_metadata", issue = "81513")]
#[inline]
pub const fn from_raw_parts(
data_pointer: NonNull<()>,
@ -269,7 +264,6 @@ pub const fn from_raw_parts(
///
/// The pointer can be later reconstructed with [`NonNull::from_raw_parts`].
#[unstable(feature = "ptr_metadata", issue = "81513")]
#[rustc_const_unstable(feature = "ptr_metadata", issue = "81513")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
@ -1545,7 +1539,6 @@ pub const fn as_non_null_ptr(self) -> NonNull<T> {
#[inline]
#[must_use]
#[unstable(feature = "slice_ptr_get", issue = "74265")]
#[rustc_const_unstable(feature = "slice_ptr_get", issue = "74265")]
#[rustc_never_returns_null_ptr]
pub const fn as_mut_ptr(self) -> *mut T {
self.as_non_null_ptr().as_ptr()
@ -1591,7 +1584,6 @@ pub const fn as_mut_ptr(self) -> *mut T {
#[inline]
#[must_use]
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
pub const unsafe fn as_uninit_slice<'a>(self) -> &'a [MaybeUninit<T>] {
// SAFETY: the caller must uphold the safety contract for `as_uninit_slice`.
unsafe { slice::from_raw_parts(self.cast().as_ptr(), self.len()) }
@ -1656,7 +1648,6 @@ pub const fn as_mut_ptr(self) -> *mut T {
#[inline]
#[must_use]
#[unstable(feature = "ptr_as_uninit", issue = "75402")]
#[rustc_const_unstable(feature = "ptr_as_uninit", issue = "75402")]
pub const unsafe fn as_uninit_slice_mut<'a>(self) -> &'a mut [MaybeUninit<T>] {
// SAFETY: the caller must uphold the safety contract for `as_uninit_slice_mut`.
unsafe { slice::from_raw_parts_mut(self.cast().as_ptr(), self.len()) }

View File

@ -218,7 +218,6 @@ pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
#[inline]
#[must_use]
#[unstable(feature = "str_from_raw_parts", issue = "119206")]
#[rustc_const_unstable(feature = "str_from_raw_parts", issue = "119206")]
pub const unsafe fn from_raw_parts<'a>(ptr: *const u8, len: usize) -> &'a str {
// SAFETY: the caller must uphold the safety contract for `from_raw_parts`.
unsafe { &*ptr::from_raw_parts(ptr, len) }
@ -237,7 +236,6 @@ pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
#[inline]
#[must_use]
#[unstable(feature = "str_from_raw_parts", issue = "119206")]
#[rustc_const_unstable(feature = "const_str_from_raw_parts_mut", issue = "119206")]
pub const unsafe fn from_raw_parts_mut<'a>(ptr: *mut u8, len: usize) -> &'a mut str {
// SAFETY: the caller must uphold the safety contract for `from_raw_parts_mut`.
unsafe { &mut *ptr::from_raw_parts_mut(ptr, len) }

View File

@ -130,7 +130,6 @@ pub const fn get_mut(&mut self) -> &mut T {
/// access to the underlying value, but _pinned_ `Exclusive`s only
/// produce _pinned_ access to the underlying value.
#[unstable(feature = "exclusive_wrapper", issue = "98407")]
#[rustc_const_unstable(feature = "exclusive_wrapper", issue = "98407")]
#[must_use]
#[inline]
pub const fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T> {
@ -154,7 +153,6 @@ pub const fn from_mut(r: &'_ mut T) -> &'_ mut Exclusive<T> {
/// a _pinned mutable_ reference to a `T`. This allows you to skip
/// building an `Exclusive` with [`Exclusive::new`].
#[unstable(feature = "exclusive_wrapper", issue = "98407")]
#[rustc_const_unstable(feature = "exclusive_wrapper", issue = "98407")]
#[must_use]
#[inline]
pub const fn from_pin_mut(r: Pin<&'_ mut T>) -> Pin<&'_ mut Exclusive<T>> {

View File

@ -253,7 +253,6 @@ pub const fn waker(&self) -> &'a Waker {
/// Returns a reference to the [`LocalWaker`] for the current task.
#[inline]
#[unstable(feature = "local_waker", issue = "118959")]
#[rustc_const_unstable(feature = "local_waker", issue = "118959")]
pub const fn local_waker(&self) -> &'a LocalWaker {
&self.local_waker
}
@ -261,7 +260,6 @@ pub const fn local_waker(&self) -> &'a LocalWaker {
/// Returns a reference to the extension data for the current task.
#[inline]
#[unstable(feature = "context_ext", issue = "123392")]
#[rustc_const_unstable(feature = "context_ext", issue = "123392")]
pub const fn ext(&mut self) -> &mut dyn Any {
// FIXME: this field makes Context extra-weird about unwind safety
// can we justify AssertUnwindSafe if we stabilize this? do we care?
@ -337,7 +335,6 @@ pub const fn from_waker(waker: &'a Waker) -> Self {
/// Creates a ContextBuilder from an existing Context.
#[inline]
#[unstable(feature = "context_ext", issue = "123392")]
#[rustc_const_unstable(feature = "context_ext", issue = "123392")]
pub const fn from(cx: &'a mut Context<'_>) -> Self {
let ext = match &mut cx.ext.0 {
ExtData::Some(ext) => ExtData::Some(*ext),
@ -355,7 +352,6 @@ pub const fn from(cx: &'a mut Context<'_>) -> Self {
/// Sets the value for the waker on `Context`.
#[inline]
#[unstable(feature = "context_ext", issue = "123392")]
#[rustc_const_unstable(feature = "context_ext", issue = "123392")]
pub const fn waker(self, waker: &'a Waker) -> Self {
Self { waker, ..self }
}
@ -363,7 +359,6 @@ pub const fn waker(self, waker: &'a Waker) -> Self {
/// Sets the value for the local waker on `Context`.
#[inline]
#[unstable(feature = "local_waker", issue = "118959")]
#[rustc_const_unstable(feature = "local_waker", issue = "118959")]
pub const fn local_waker(self, local_waker: &'a LocalWaker) -> Self {
Self { local_waker, ..self }
}
@ -371,7 +366,6 @@ pub const fn local_waker(self, local_waker: &'a LocalWaker) -> Self {
/// Sets the value for the extension data on `Context`.
#[inline]
#[unstable(feature = "context_ext", issue = "123392")]
#[rustc_const_unstable(feature = "context_ext", issue = "123392")]
pub const fn ext(self, data: &'a mut dyn Any) -> Self {
Self { ext: ExtData::Some(data), ..self }
}
@ -834,7 +828,6 @@ pub fn will_wake(&self, other: &LocalWaker) -> bool {
#[inline]
#[must_use]
#[unstable(feature = "local_waker", issue = "118959")]
#[rustc_const_unstable(feature = "local_waker", issue = "118959")]
pub const unsafe fn from_raw(waker: RawWaker) -> LocalWaker {
Self { waker }
}

View File

@ -883,7 +883,6 @@ pub const fn as_secs_f32(&self) -> f32 {
#[unstable(feature = "duration_millis_float", issue = "122451")]
#[must_use]
#[inline]
#[rustc_const_unstable(feature = "duration_millis_float", issue = "122451")]
pub const fn as_millis_f64(&self) -> f64 {
(self.secs as f64) * (MILLIS_PER_SEC as f64)
+ (self.nanos.0 as f64) / (NANOS_PER_MILLI as f64)
@ -904,7 +903,6 @@ pub const fn as_millis_f64(&self) -> f64 {
#[unstable(feature = "duration_millis_float", issue = "122451")]
#[must_use]
#[inline]
#[rustc_const_unstable(feature = "duration_millis_float", issue = "122451")]
pub const fn as_millis_f32(&self) -> f32 {
(self.secs as f32) * (MILLIS_PER_SEC as f32)
+ (self.nanos.0 as f32) / (NANOS_PER_MILLI as f32)

View File

@ -1,6 +1,5 @@
///! This file is generated by src/tools/unicode-table-generator; do not edit manually!
#[rustc_const_unstable(feature = "const_unicode_case_lookup", issue = "101400")]
#[inline(always)]
const fn bitset_search<
const N: usize,
@ -424,7 +423,6 @@ pub mod lowercase {
(5, 187), (6, 78), (7, 132),
];
#[rustc_const_unstable(feature = "const_unicode_case_lookup", issue = "101400")]
pub const fn lookup(c: char) -> bool {
super::bitset_search(
c as u32,
@ -549,7 +547,6 @@ pub mod uppercase {
(2, 146), (2, 20), (3, 146), (3, 140), (3, 134), (4, 178), (4, 171),
];
#[rustc_const_unstable(feature = "const_unicode_case_lookup", issue = "101400")]
pub const fn lookup(c: char) -> bool {
super::bitset_search(
c as u32,

View File

@ -17,13 +17,11 @@
#![feature(clone_to_uninit)]
#![feature(const_align_of_val_raw)]
#![feature(const_align_offset)]
#![feature(const_bigint_helper_methods)]
#![feature(const_black_box)]
#![feature(const_eval_select)]
#![feature(const_hash)]
#![feature(const_heap)]
#![feature(const_nonnull_new)]
#![feature(const_num_midpoint)]
#![feature(const_option_ext)]
#![feature(const_pin_2)]
#![feature(const_pointer_is_aligned)]

View File

@ -1,4 +1,3 @@
#[rustc_const_unstable(feature = "const_unicode_case_lookup", issue = "101400")]
#[inline(always)]
const fn bitset_search<
const N: usize,

View File

@ -97,11 +97,6 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
self.blank_line();
writeln!(
&mut self.file,
r#"#[rustc_const_unstable(feature = "const_unicode_case_lookup", issue = "101400")]"#
)
.unwrap();
writeln!(&mut self.file, "pub const fn lookup(c: char) -> bool {{").unwrap();
if first_code_point > 0x7f {
writeln!(&mut self.file, " (c as u32) >= {first_code_point:#04x} &&").unwrap();