Skip to content

Commit

Permalink
Auto merge of rust-lang#129941 - BoxyUwU:bump-boostrap, r=albertlarsan68
Browse files Browse the repository at this point in the history
Bump boostrap compiler to new beta

Accidentally left some comments on the update cfgs commit directly xd
  • Loading branch information
bors committed Sep 7, 2024
2 parents fd0bc94 + 349f8d5 commit 4f47132
Show file tree
Hide file tree
Showing 39 changed files with 77 additions and 140 deletions.
8 changes: 4 additions & 4 deletions alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl<T> Box<T> {
/// assert_eq!(*five, 5)
/// ```
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_uninit", since = "1.82.0")]
#[must_use]
#[inline]
pub fn new_uninit() -> Box<mem::MaybeUninit<T>> {
Expand Down Expand Up @@ -663,7 +663,7 @@ impl<T> Box<[T]> {
/// assert_eq!(*values, [1, 2, 3])
/// ```
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_uninit", since = "1.82.0")]
#[must_use]
pub fn new_uninit_slice(len: usize) -> Box<[mem::MaybeUninit<T>]> {
unsafe { RawVec::with_capacity(len).into_box(len) }
Expand Down Expand Up @@ -930,7 +930,7 @@ impl<T, A: Allocator> Box<mem::MaybeUninit<T>, A> {
///
/// assert_eq!(*five, 5)
/// ```
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_uninit", since = "1.82.0")]
#[inline]
pub unsafe fn assume_init(self) -> Box<T, A> {
let (raw, alloc) = Box::into_raw_with_allocator(self);
Expand Down Expand Up @@ -1003,7 +1003,7 @@ impl<T, A: Allocator> Box<[mem::MaybeUninit<T>], A> {
///
/// assert_eq!(*values, [1, 2, 3])
/// ```
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_uninit", since = "1.82.0")]
#[inline]
pub unsafe fn assume_init(self) -> Box<[T], A> {
let (raw, alloc) = Box::into_raw_with_allocator(self);
Expand Down
2 changes: 1 addition & 1 deletion alloc/src/collections/binary_heap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ pub struct Iter<'a, T: 'a> {
iter: slice::Iter<'a, T>,
}

#[stable(feature = "default_iters_sequel", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "default_iters_sequel", since = "1.82.0")]
impl<T> Default for Iter<'_, T> {
/// Creates an empty `binary_heap::Iter`.
///
Expand Down
4 changes: 2 additions & 2 deletions alloc/src/collections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,7 @@ impl<K, V> Default for Range<'_, K, V> {
}
}

#[stable(feature = "default_iters_sequel", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "default_iters_sequel", since = "1.82.0")]
impl<K, V> Default for RangeMut<'_, K, V> {
/// Creates an empty `btree_map::RangeMut`.
///
Expand Down Expand Up @@ -2064,7 +2064,7 @@ impl<K, V> ExactSizeIterator for ValuesMut<'_, K, V> {
#[stable(feature = "fused", since = "1.26.0")]
impl<K, V> FusedIterator for ValuesMut<'_, K, V> {}

#[stable(feature = "default_iters_sequel", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "default_iters_sequel", since = "1.82.0")]
impl<K, V> Default for ValuesMut<'_, K, V> {
/// Creates an empty `btree_map::ValuesMut`.
///
Expand Down
4 changes: 0 additions & 4 deletions alloc/src/collections/vec_deque/into_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ impl<T, A: Allocator> Iterator for IntoIter<T, A> {
{
match self.try_fold(init, |b, item| Ok::<B, !>(f(b, item))) {
Ok(b) => b,
#[cfg(bootstrap)]
Err(e) => match e {},
}
}

Expand Down Expand Up @@ -243,8 +241,6 @@ impl<T, A: Allocator> DoubleEndedIterator for IntoIter<T, A> {
{
match self.try_rfold(init, |b, item| Ok::<B, !>(f(b, item))) {
Ok(b) => b,
#[cfg(bootstrap)]
Err(e) => match e {},
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion alloc/src/collections/vec_deque/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl<T: fmt::Debug> fmt::Debug for Iter<'_, T> {
}
}

#[stable(feature = "default_iters_sequel", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "default_iters_sequel", since = "1.82.0")]
impl<T> Default for Iter<'_, T> {
/// Creates an empty `vec_deque::Iter`.
///
Expand Down
2 changes: 1 addition & 1 deletion alloc/src/collections/vec_deque/iter_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl<T: fmt::Debug> fmt::Debug for IterMut<'_, T> {
}
}

#[stable(feature = "default_iters_sequel", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "default_iters_sequel", since = "1.82.0")]
impl<T> Default for IterMut<'_, T> {
/// Creates an empty `vec_deque::IterMut`.
///
Expand Down
8 changes: 4 additions & 4 deletions alloc/src/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ impl<T> Rc<T> {
/// assert_eq!(*five, 5)
/// ```
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_uninit", since = "1.82.0")]
#[must_use]
pub fn new_uninit() -> Rc<mem::MaybeUninit<T>> {
unsafe {
Expand Down Expand Up @@ -980,7 +980,7 @@ impl<T> Rc<[T]> {
/// assert_eq!(*values, [1, 2, 3])
/// ```
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_uninit", since = "1.82.0")]
#[must_use]
pub fn new_uninit_slice(len: usize) -> Rc<[mem::MaybeUninit<T>]> {
unsafe { Rc::from_ptr(Rc::allocate_for_slice(len)) }
Expand Down Expand Up @@ -1127,7 +1127,7 @@ impl<T, A: Allocator> Rc<mem::MaybeUninit<T>, A> {
///
/// assert_eq!(*five, 5)
/// ```
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_uninit", since = "1.82.0")]
#[inline]
pub unsafe fn assume_init(self) -> Rc<T, A> {
let (ptr, alloc) = Rc::into_inner_with_allocator(self);
Expand Down Expand Up @@ -1167,7 +1167,7 @@ impl<T, A: Allocator> Rc<[mem::MaybeUninit<T>], A> {
///
/// assert_eq!(*values, [1, 2, 3])
/// ```
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_uninit", since = "1.82.0")]
#[inline]
pub unsafe fn assume_init(self) -> Rc<[T], A> {
let (ptr, alloc) = Rc::into_inner_with_allocator(self);
Expand Down
8 changes: 4 additions & 4 deletions alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ impl<T> Arc<T> {
/// ```
#[cfg(not(no_global_oom_handling))]
#[inline]
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_uninit", since = "1.82.0")]
#[must_use]
pub fn new_uninit() -> Arc<mem::MaybeUninit<T>> {
unsafe {
Expand Down Expand Up @@ -1115,7 +1115,7 @@ impl<T> Arc<[T]> {
/// ```
#[cfg(not(no_global_oom_handling))]
#[inline]
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_uninit", since = "1.82.0")]
#[must_use]
pub fn new_uninit_slice(len: usize) -> Arc<[mem::MaybeUninit<T>]> {
unsafe { Arc::from_ptr(Arc::allocate_for_slice(len)) }
Expand Down Expand Up @@ -1262,7 +1262,7 @@ impl<T, A: Allocator> Arc<mem::MaybeUninit<T>, A> {
///
/// assert_eq!(*five, 5)
/// ```
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_uninit", since = "1.82.0")]
#[must_use = "`self` will be dropped if the result is not used"]
#[inline]
pub unsafe fn assume_init(self) -> Arc<T, A> {
Expand Down Expand Up @@ -1303,7 +1303,7 @@ impl<T, A: Allocator> Arc<[mem::MaybeUninit<T>], A> {
///
/// assert_eq!(*values, [1, 2, 3])
/// ```
#[stable(feature = "new_uninit", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "new_uninit", since = "1.82.0")]
#[must_use = "`self` will be dropped if the result is not used"]
#[inline]
pub unsafe fn assume_init(self) -> Arc<[T], A> {
Expand Down
9 changes: 0 additions & 9 deletions core/src/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@
#[stable(feature = "simd_arch", since = "1.27.0")]
pub use crate::core_arch::arch::*;

#[cfg(bootstrap)]
#[allow(dead_code)]
#[unstable(feature = "sha512_sm_x86", issue = "126624")]
fn dummy() {
// AArch64 also has a target feature named `sm4`, so we need `#![feature(sha512_sm_x86)]` in lib.rs
// But as the bootstrap compiler doesn't know about this feature yet, we need to convert it to a
// library feature until bootstrap gets bumped
}

/// Inline assembly.
///
/// Refer to [Rust By Example] for a usage guide and the [reference] for
Expand Down
6 changes: 3 additions & 3 deletions core/src/cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ pub use once::OnceCell;
/// See the [module-level documentation](self) for more.
#[stable(feature = "rust1", since = "1.0.0")]
#[repr(transparent)]
#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
#[rustc_pub_transparent]
pub struct Cell<T: ?Sized> {
value: UnsafeCell<T>,
}
Expand Down Expand Up @@ -2056,7 +2056,7 @@ impl<T: ?Sized + fmt::Display> fmt::Display for RefMut<'_, T> {
#[lang = "unsafe_cell"]
#[stable(feature = "rust1", since = "1.0.0")]
#[repr(transparent)]
#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
#[rustc_pub_transparent]
pub struct UnsafeCell<T: ?Sized> {
value: T,
}
Expand Down Expand Up @@ -2299,7 +2299,7 @@ impl<T> UnsafeCell<*mut T> {
/// See [`UnsafeCell`] for details.
#[unstable(feature = "sync_unsafe_cell", issue = "95439")]
#[repr(transparent)]
#[cfg_attr(not(bootstrap), rustc_pub_transparent)]
#[rustc_pub_transparent]
pub struct SyncUnsafeCell<T: ?Sized> {
value: UnsafeCell<T>,
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ pub trait Clone: Sized {
#[must_use = "cloning is often expensive and is not expected to have side effects"]
// Clone::clone is special because the compiler generates MIR to implement it for some types.
// See InstanceKind::CloneShim.
#[cfg_attr(not(bootstrap), lang = "clone_fn")]
#[lang = "clone_fn"]
fn clone(&self) -> Self;

/// Performs copy-assignment from `source`.
Expand Down
2 changes: 1 addition & 1 deletion core/src/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ use crate::ascii::Char as AsciiChar;
/// ```
#[cfg_attr(not(test), rustc_diagnostic_item = "Default")]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(bootstrap), rustc_trivial_field_reads)]
#[rustc_trivial_field_reads]
pub trait Default: Sized {
/// Returns the "default value" for a type.
///
Expand Down
2 changes: 1 addition & 1 deletion core/src/future/ready.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl<T> Ready<T> {
/// let a = future::ready(1);
/// assert_eq!(a.into_inner(), 1);
/// ```
#[stable(feature = "ready_into_inner", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "ready_into_inner", since = "1.82.0")]
#[must_use]
#[inline]
pub fn into_inner(self) -> T {
Expand Down
7 changes: 0 additions & 7 deletions core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,6 @@ pub const fn unlikely(b: bool) -> bool {
/// any safety invariants.
///
/// This intrinsic does not have a stable counterpart.
#[cfg(not(bootstrap))]
#[unstable(feature = "core_intrinsics", issue = "none")]
#[rustc_intrinsic]
#[rustc_nounwind]
Expand All @@ -1030,12 +1029,6 @@ pub fn select_unpredictable<T>(b: bool, true_val: T, false_val: T) -> T {
if b { true_val } else { false_val }
}

#[cfg(bootstrap)]
#[inline]
pub fn select_unpredictable<T>(b: bool, true_val: T, false_val: T) -> T {
if b { true_val } else { false_val }
}

extern "rust-intrinsic" {
/// Executes a breakpoint trap, for inspection by a debugger.
///
Expand Down
6 changes: 3 additions & 3 deletions core/src/iter/adapters/take.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ impl<I: Iterator + TrustedRandomAccess> SpecTake for Take<I> {
}
}

#[stable(feature = "exact_size_take_repeat", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "exact_size_take_repeat", since = "1.82.0")]
impl<T: Clone> DoubleEndedIterator for Take<crate::iter::Repeat<T>> {
#[inline]
fn next_back(&mut self) -> Option<Self::Item> {
Expand Down Expand Up @@ -361,14 +361,14 @@ impl<T: Clone> DoubleEndedIterator for Take<crate::iter::Repeat<T>> {
// because we have no way to return value of nth invocation of repeater followed
// by n-1st without remembering all results.

#[stable(feature = "exact_size_take_repeat", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "exact_size_take_repeat", since = "1.82.0")]
impl<T: Clone> ExactSizeIterator for Take<crate::iter::Repeat<T>> {
fn len(&self) -> usize {
self.n
}
}

#[stable(feature = "exact_size_take_repeat", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "exact_size_take_repeat", since = "1.82.0")]
impl<F: FnMut() -> A, A> ExactSizeIterator for Take<crate::iter::RepeatWith<F>> {
fn len(&self) -> usize {
self.n
Expand Down
2 changes: 1 addition & 1 deletion core/src/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ pub use self::sources::{once, Once};
pub use self::sources::{once_with, OnceWith};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::sources::{repeat, Repeat};
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
pub use self::sources::{repeat_n, RepeatN};
#[stable(feature = "iterator_repeat_with", since = "1.28.0")]
pub use self::sources::{repeat_with, RepeatWith};
Expand Down
2 changes: 1 addition & 1 deletion core/src/iter/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub use self::once::{once, Once};
pub use self::once_with::{once_with, OnceWith};
#[stable(feature = "rust1", since = "1.0.0")]
pub use self::repeat::{repeat, Repeat};
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
pub use self::repeat_n::{repeat_n, RepeatN};
#[stable(feature = "iterator_repeat_with", since = "1.28.0")]
pub use self::repeat_with::{repeat_with, RepeatWith};
Expand Down
16 changes: 8 additions & 8 deletions core/src/iter/sources/repeat_n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ use crate::num::NonZero;
/// assert_eq!(None, it.next());
/// ```
#[inline]
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
pub fn repeat_n<T: Clone>(element: T, count: usize) -> RepeatN<T> {
let mut element = ManuallyDrop::new(element);

Expand All @@ -75,7 +75,7 @@ pub fn repeat_n<T: Clone>(element: T, count: usize) -> RepeatN<T> {
/// This `struct` is created by the [`repeat_n()`] function.
/// See its documentation for more.
#[derive(Clone, Debug)]
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
pub struct RepeatN<A> {
count: usize,
// Invariant: has been dropped iff count == 0.
Expand All @@ -99,14 +99,14 @@ impl<A> RepeatN<A> {
}
}

#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
impl<A> Drop for RepeatN<A> {
fn drop(&mut self) {
self.take_element();
}
}

#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
impl<A: Clone> Iterator for RepeatN<A> {
type Item = A;

Expand Down Expand Up @@ -154,14 +154,14 @@ impl<A: Clone> Iterator for RepeatN<A> {
}
}

#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
impl<A: Clone> ExactSizeIterator for RepeatN<A> {
fn len(&self) -> usize {
self.count
}
}

#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
impl<A: Clone> DoubleEndedIterator for RepeatN<A> {
#[inline]
fn next_back(&mut self) -> Option<A> {
Expand All @@ -179,12 +179,12 @@ impl<A: Clone> DoubleEndedIterator for RepeatN<A> {
}
}

#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
impl<A: Clone> FusedIterator for RepeatN<A> {}

#[unstable(feature = "trusted_len", issue = "37572")]
unsafe impl<A: Clone> TrustedLen for RepeatN<A> {}
#[stable(feature = "iter_repeat_n", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "iter_repeat_n", since = "1.82.0")]
impl<A: Clone> UncheckedIterator for RepeatN<A> {
#[inline]
unsafe fn next_unchecked(&mut self) -> Self::Item {
Expand Down
6 changes: 3 additions & 3 deletions core/src/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3953,7 +3953,7 @@ pub trait Iterator {
/// assert!(![0.0, 1.0, f32::NAN].iter().is_sorted());
/// ```
#[inline]
#[stable(feature = "is_sorted", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "is_sorted", since = "1.82.0")]
#[rustc_do_not_const_check]
fn is_sorted(self) -> bool
where
Expand All @@ -3980,7 +3980,7 @@ pub trait Iterator {
/// assert!(std::iter::empty::<i32>().is_sorted_by(|a, b| false));
/// assert!(std::iter::empty::<i32>().is_sorted_by(|a, b| true));
/// ```
#[stable(feature = "is_sorted", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "is_sorted", since = "1.82.0")]
#[rustc_do_not_const_check]
fn is_sorted_by<F>(mut self, compare: F) -> bool
where
Expand Down Expand Up @@ -4025,7 +4025,7 @@ pub trait Iterator {
/// assert!(![-2i32, -1, 0, 3].iter().is_sorted_by_key(|n| n.abs()));
/// ```
#[inline]
#[stable(feature = "is_sorted", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "is_sorted", since = "1.82.0")]
#[rustc_do_not_const_check]
fn is_sorted_by_key<F, K>(self, f: F) -> bool
where
Expand Down
Loading

0 comments on commit 4f47132

Please sign in to comment.