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

5 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -390,9 +390,6 @@ impl MaybeUninit {
390 390 #[must_use]
391 391 #[rustc_diagnostic_item = "maybe_uninit_zeroed"]
392 392 #[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)]
396 393 #[rustc_const_stable(feature = "const_maybe_uninit_zeroed", since = "1.75.0")]
397 394 pub const fn zeroed() -> MaybeUninit<T> {
398 395 let mut u = MaybeUninit::<T>::uninit();
Original file line number Diff line number Diff line change
@@ -1475,7 +1475,6 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
1475 1475 /// ```
1476 1476 #[unstable(feature = "num_midpoint", issue = "110840")]
1477 1477 #[rustc_const_unstable(feature = "const_num_midpoint", issue = "110840")]
1478 - #[rustc_allow_const_fn_unstable(const_num_midpoint)]
1479 1478 #[must_use = "this returns the result of the operation, \
1480 1479 without modifying the original"]
1481 1480 #[inline]
Original file line number Diff line number Diff line change
@@ -844,7 +844,6 @@ pub const fn from_ref<T: ?Sized>(r: &T) -> *const T {
844 844 #[must_use]
845 845 #[stable(feature = "ptr_from_ref", since = "1.76.0")]
846 846 #[rustc_const_stable(feature = "ptr_from_ref", since = "1.76.0")]
847 -#[rustc_allow_const_fn_unstable(const_mut_refs)]
848 847 #[rustc_never_returns_null_ptr]
849 848 pub const fn from_mut<T: ?Sized>(r: &mut T) -> *mut T {
850 849 r
Original file line number Diff line number Diff line change
@@ -764,7 +764,6 @@ impl [T] {
764 764 /// ```
765 765 #[stable(feature = "rust1", since = "1.0.0")]
766 766 #[rustc_const_stable(feature = "const_ptr_offset", since = "1.61.0")]
767 -#[rustc_allow_const_fn_unstable(const_mut_refs)]
768 767 #[rustc_never_returns_null_ptr]
769 768 #[inline(always)]
770 769 #[must_use]
@@ -1867,7 +1866,6 @@ impl [T] {
1867 1866 /// ```
1868 1867 #[stable(feature = "rust1", since = "1.0.0")]
1869 1868 #[rustc_const_stable(feature = "const_slice_split_at_not_mut", since = "1.71.0")]
1870 -#[rustc_allow_const_fn_unstable(split_at_checked)]
1871 1869 #[inline]
1872 1870 #[track_caller]
1873 1871 #[must_use]
Original file line number Diff line number Diff line change
@@ -761,7 +761,6 @@ impl str {
761 761 #[must_use]
762 762 #[stable(feature = "split_at_checked", since = "1.80.0")]
763 763 #[rustc_const_unstable(feature = "const_str_split_at", issue = "131518")]
764 -#[rustc_allow_const_fn_unstable(const_is_char_boundary)]
765 764 pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut str, &mut str)> {
766 765 // is_char_boundary checks that the index is in [0, .len()]
767 766 if self.is_char_boundary(mid) {