Rollup merge of #132451 - RalfJung:less-rustc_allow_const_fn_unstable… · qinheping/verify-rust-std@8fdd6d4

5 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -390,9 +390,6 @@ impl<T> MaybeUninit<T> {

390390

#[must_use]

391391

#[rustc_diagnostic_item = "maybe_uninit_zeroed"]

392392

#[stable(feature = "maybe_uninit", since = "1.36.0")]

393-

// These are OK to allow since we do not leak &mut to user-visible API

394-

#[rustc_allow_const_fn_unstable(const_mut_refs)]

395-

#[rustc_allow_const_fn_unstable(const_ptr_write)]

396393

#[rustc_const_stable(feature = "const_maybe_uninit_zeroed", since = "1.75.0")]

397394

pub const fn zeroed() -> MaybeUninit<T> {

398395

let mut u = MaybeUninit::<T>::uninit();

Original file line numberDiff line numberDiff line change

@@ -1475,7 +1475,6 @@ macro_rules! nonzero_integer_signedness_dependent_methods {

14751475

/// ```

14761476

#[unstable(feature = "num_midpoint", issue = "110840")]

14771477

#[rustc_const_unstable(feature = "const_num_midpoint", issue = "110840")]

1478-

#[rustc_allow_const_fn_unstable(const_num_midpoint)]

14791478

#[must_use = "this returns the result of the operation, \

14801479

without modifying the original"]

14811480

#[inline]

Original file line numberDiff line numberDiff line change

@@ -844,7 +844,6 @@ pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {

844844

#[must_use]

845845

#[stable(feature = "ptr_from_ref", since = "1.76.0")]

846846

#[rustc_const_stable(feature = "ptr_from_ref", since = "1.76.0")]

847-

#[rustc_allow_const_fn_unstable(const_mut_refs)]

848847

#[rustc_never_returns_null_ptr]

849848

pub const fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {

850849

r

Original file line numberDiff line numberDiff line change

@@ -764,7 +764,6 @@ impl<T> [T] {

764764

/// ```

765765

#[stable(feature = "rust1", since = "1.0.0")]

766766

#[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]

767-

#[rustc_allow_const_fn_unstable(const_mut_refs)]

768767

#[rustc_never_returns_null_ptr]

769768

#[inline(always)]

770769

#[must_use]

@@ -1867,7 +1866,6 @@ impl<T> [T] {

18671866

/// ```

18681867

#[stable(feature = "rust1", since = "1.0.0")]

18691868

#[rustc_const_stable(feature = "const_slice_split_at_not_mut", since = "1.71.0")]

1870-

#[rustc_allow_const_fn_unstable(split_at_checked)]

18711869

#[inline]

18721870

#[track_caller]

18731871

#[must_use]

Original file line numberDiff line numberDiff line change

@@ -761,7 +761,6 @@ impl str {

761761

#[must_use]

762762

#[stable(feature = "split_at_checked", since = "1.80.0")]

763763

#[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")]

764-

#[rustc_allow_const_fn_unstable(const_is_char_boundary)]

765764

pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut str, &mut str)> {

766765

// is_char_boundary checks that the index is in [0, .len()]

767766

if self.is_char_boundary(mid) {