Skip to content

Commit 659951c

Browse files
committed
Auto merge of rust-lang#71439 - Mark-Simulacrum:stage0-next, r=jonas-schievink
Bump bootstrap compiler This bumps the bootstrap compiler and the rustfmt that x.py fmt uses.
2 parents b613c98 + 17a393e commit 659951c

File tree

35 files changed

+47
-345
lines changed

35 files changed

+47
-345
lines changed

src/bootstrap/channel.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use build_helper::output;
1313
use crate::Build;
1414

1515
// The version number
16-
pub const CFG_RELEASE_NUM: &str = "1.44.0";
16+
pub const CFG_RELEASE_NUM: &str = "1.45.0";
1717

1818
pub struct GitInfo {
1919
inner: Option<Info>,

src/liballoc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
#![feature(internal_uninit_const)]
100100
#![feature(lang_items)]
101101
#![feature(libc)]
102-
#![cfg_attr(not(bootstrap), feature(negative_impls))]
102+
#![feature(negative_impls)]
103103
#![feature(new_uninit)]
104104
#![feature(nll)]
105105
#![feature(optin_builtin_traits)]

src/liballoc/rc.rs

-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ struct RcBox<T: ?Sized> {
279279
/// type `T`.
280280
///
281281
/// [get_mut]: #method.get_mut
282-
#[cfg_attr(all(bootstrap, not(test)), lang = "rc")]
283282
#[cfg_attr(not(test), rustc_diagnostic_item = "Rc")]
284283
#[stable(feature = "rust1", since = "1.0.0")]
285284
pub struct Rc<T: ?Sized> {

src/liballoc/sync.rs

-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ macro_rules! acquire {
207207
/// counting in general.
208208
///
209209
/// [rc_examples]: ../../std/rc/index.html#examples
210-
#[cfg_attr(all(bootstrap, not(test)), lang = "arc")]
211210
#[cfg_attr(not(test), rustc_diagnostic_item = "Arc")]
212211
#[stable(feature = "rust1", since = "1.0.0")]
213212
pub struct Arc<T: ?Sized> {

src/libcore/clone.rs

-1
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,5 @@ mod impls {
231231

232232
/// Shared references can be cloned, but mutable references *cannot*!
233233
#[stable(feature = "rust1", since = "1.0.0")]
234-
#[cfg(not(bootstrap))]
235234
impl<T: ?Sized> !Clone for &mut T {}
236235
}

src/libcore/convert/num.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,7 @@ macro_rules! impl_float_to_int {
2828
#[doc(hidden)]
2929
#[inline]
3030
unsafe fn to_int_unchecked(self) -> $Int {
31-
#[cfg(bootstrap)]
32-
{
33-
crate::intrinsics::float_to_int_approx_unchecked(self)
34-
}
35-
#[cfg(not(bootstrap))]
36-
{
37-
crate::intrinsics::float_to_int_unchecked(self)
38-
}
31+
crate::intrinsics::float_to_int_unchecked(self)
3932
}
4033
}
4134
)+

src/libcore/future/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
//! Asynchronous values.
44
5-
#[cfg(not(bootstrap))]
65
use crate::{
76
ops::{Generator, GeneratorState},
87
pin::Pin,
@@ -24,16 +23,13 @@ pub use self::future::Future;
2423
/// It also simplifies the HIR lowering of `.await`.
2524
#[doc(hidden)]
2625
#[unstable(feature = "gen_future", issue = "50547")]
27-
#[cfg(not(bootstrap))]
2826
#[derive(Debug, Copy, Clone)]
2927
pub struct ResumeTy(NonNull<Context<'static>>);
3028

3129
#[unstable(feature = "gen_future", issue = "50547")]
32-
#[cfg(not(bootstrap))]
3330
unsafe impl Send for ResumeTy {}
3431

3532
#[unstable(feature = "gen_future", issue = "50547")]
36-
#[cfg(not(bootstrap))]
3733
unsafe impl Sync for ResumeTy {}
3834

3935
/// Wrap a generator in a future.
@@ -43,7 +39,6 @@ unsafe impl Sync for ResumeTy {}
4339
// This is `const` to avoid extra errors after we recover from `const async fn`
4440
#[doc(hidden)]
4541
#[unstable(feature = "gen_future", issue = "50547")]
46-
#[cfg(not(bootstrap))]
4742
#[inline]
4843
pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
4944
where
@@ -75,7 +70,6 @@ where
7570

7671
#[doc(hidden)]
7772
#[unstable(feature = "gen_future", issue = "50547")]
78-
#[cfg(not(bootstrap))]
7973
#[inline]
8074
pub unsafe fn get_context<'a, 'b>(cx: ResumeTy) -> &'a mut Context<'b> {
8175
&mut *cx.0.as_ptr().cast()

src/libcore/intrinsics.rs

-33
Original file line numberDiff line numberDiff line change
@@ -980,22 +980,7 @@ extern "rust-intrinsic" {
980980
///
981981
/// The stabilized version of this intrinsic is
982982
/// [`std::mem::size_of_val`](../../std/mem/fn.size_of_val.html).
983-
#[cfg(bootstrap)]
984-
pub fn size_of_val<T: ?Sized>(_: &T) -> usize;
985-
/// The minimum alignment of the type of the value that `val` points to.
986-
///
987-
/// The stabilized version of this intrinsic is
988-
/// [`std::mem::min_align_of_val`](../../std/mem/fn.min_align_of_val.html).
989-
#[cfg(bootstrap)]
990-
pub fn min_align_of_val<T: ?Sized>(_: &T) -> usize;
991-
992-
/// The size of the referenced value in bytes.
993-
///
994-
/// The stabilized version of this intrinsic is
995-
/// [`std::mem::size_of_val`](../../std/mem/fn.size_of_val.html).
996-
#[cfg(not(bootstrap))]
997983
pub fn size_of_val<T: ?Sized>(_: *const T) -> usize;
998-
#[cfg(not(bootstrap))]
999984
pub fn min_align_of_val<T: ?Sized>(_: *const T) -> usize;
1000985

1001986
/// Gets a static string slice containing the name of a type.
@@ -1016,22 +1001,14 @@ extern "rust-intrinsic" {
10161001

10171002
/// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited:
10181003
/// This will statically either panic, or do nothing.
1019-
#[cfg(bootstrap)]
1020-
pub fn panic_if_uninhabited<T>();
1021-
1022-
/// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited:
1023-
/// This will statically either panic, or do nothing.
1024-
#[cfg(not(bootstrap))]
10251004
pub fn assert_inhabited<T>();
10261005

10271006
/// A guard for unsafe functions that cannot ever be executed if `T` does not permit
10281007
/// zero-initialization: This will statically either panic, or do nothing.
1029-
#[cfg(not(bootstrap))]
10301008
pub fn assert_zero_valid<T>();
10311009

10321010
/// A guard for unsafe functions that cannot ever be executed if `T` has invalid
10331011
/// bit patterns: This will statically either panic, or do nothing.
1034-
#[cfg(not(bootstrap))]
10351012
pub fn assert_uninit_valid<T>();
10361013

10371014
/// Gets a reference to a static `Location` indicating where it was called.
@@ -1597,17 +1574,10 @@ extern "rust-intrinsic" {
15971574
/// May assume inputs are finite.
15981575
pub fn frem_fast<T: Copy>(a: T, b: T) -> T;
15991576

1600-
/// Convert with LLVM’s fptoui/fptosi, which may return undef for values out of range
1601-
/// (<https://github.com/rust-lang/rust/issues/10184>)
1602-
/// This is under stabilization at <https://github.com/rust-lang/rust/issues/67058>
1603-
#[cfg(bootstrap)]
1604-
pub fn float_to_int_approx_unchecked<Float: Copy, Int: Copy>(value: Float) -> Int;
1605-
16061577
/// Convert with LLVM’s fptoui/fptosi, which may return undef for values out of range
16071578
/// (<https://github.com/rust-lang/rust/issues/10184>)
16081579
///
16091580
/// Stabilized as `f32::to_int_unchecked` and `f64::to_int_unchecked`.
1610-
#[cfg(not(bootstrap))]
16111581
pub fn float_to_int_unchecked<Float: Copy, Int: Copy>(value: Float) -> Int;
16121582

16131583
/// Returns the number of bits set in an integer type `T`
@@ -1877,10 +1847,7 @@ extern "rust-intrinsic" {
18771847
/// takes the data pointer and a pointer to the target-specific exception
18781848
/// object that was caught. For more information see the compiler's
18791849
/// source as well as std's catch implementation.
1880-
#[cfg(not(bootstrap))]
18811850
pub fn r#try(try_fn: fn(*mut u8), data: *mut u8, catch_fn: fn(*mut u8, *mut u8)) -> i32;
1882-
#[cfg(bootstrap)]
1883-
pub fn r#try(f: fn(*mut u8), data: *mut u8, local_ptr: *mut u8) -> i32;
18841851

18851852
/// Emits a `!nontemporal` store according to LLVM (see their docs).
18861853
/// Probably will never become stable.

src/libcore/iter/range.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ macro_rules! step_identical_methods {
7070
fn sub_one(&self) -> Self {
7171
Sub::sub(*self, 1)
7272
}
73-
}
73+
};
7474
}
7575

7676
macro_rules! step_impl_unsigned {

src/libcore/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
#![feature(lang_items)]
100100
#![feature(link_llvm_intrinsics)]
101101
#![feature(llvm_asm)]
102-
#![cfg_attr(not(bootstrap), feature(negative_impls))]
102+
#![feature(negative_impls)]
103103
#![feature(never_type)]
104104
#![feature(nll)]
105105
#![feature(exhaustive_patterns)]

src/libcore/macros/mod.rs

-44
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,3 @@
1-
#[cfg(bootstrap)]
2-
#[doc(include = "panic.md")]
3-
#[macro_export]
4-
#[allow_internal_unstable(core_panic, track_caller)]
5-
#[stable(feature = "core", since = "1.6.0")]
6-
macro_rules! panic {
7-
() => (
8-
$crate::panic!("explicit panic")
9-
);
10-
($msg:expr) => (
11-
$crate::panicking::panic($msg)
12-
);
13-
($msg:expr,) => (
14-
$crate::panic!($msg)
15-
);
16-
($fmt:expr, $($arg:tt)+) => (
17-
$crate::panicking::panic_fmt(
18-
$crate::format_args!($fmt, $($arg)+),
19-
$crate::panic::Location::caller(),
20-
)
21-
);
22-
}
23-
24-
#[cfg(not(bootstrap))]
251
#[doc(include = "panic.md")]
262
#[macro_export]
273
#[allow_internal_unstable(core_panic, track_caller)]
@@ -1341,25 +1317,6 @@ pub(crate) mod builtin {
13411317
/// Read the [unstable book] for the usage.
13421318
///
13431319
/// [unstable book]: ../unstable-book/library-features/asm.html
1344-
#[cfg(bootstrap)]
1345-
#[unstable(
1346-
feature = "llvm_asm",
1347-
issue = "70173",
1348-
reason = "inline assembly is not stable enough for use and is subject to change"
1349-
)]
1350-
#[macro_export]
1351-
#[allow_internal_unstable(asm)]
1352-
macro_rules! llvm_asm {
1353-
// Redirect to asm! for stage0
1354-
($($arg:tt)*) => { $crate::asm!($($arg)*) }
1355-
}
1356-
1357-
/// Inline assembly.
1358-
///
1359-
/// Read the [unstable book] for the usage.
1360-
///
1361-
/// [unstable book]: ../unstable-book/library-features/asm.html
1362-
#[cfg(not(bootstrap))]
13631320
#[unstable(
13641321
feature = "llvm_asm",
13651322
issue = "70173",
@@ -1460,7 +1417,6 @@ pub(crate) mod builtin {
14601417
}
14611418

14621419
/// Keeps the item it's applied to if the passed path is accessible, and removes it otherwise.
1463-
#[cfg(not(bootstrap))]
14641420
#[unstable(
14651421
feature = "cfg_accessible",
14661422
issue = "64797",

src/libcore/marker.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl<T: ?Sized> !Send for *mut T {}
9090
ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>"
9191
)]
9292
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
93-
#[cfg_attr(not(bootstrap), rustc_specialization_trait)]
93+
#[rustc_specialization_trait]
9494
pub trait Sized {
9595
// Empty.
9696
}

src/libcore/mem/maybe_uninit.rs

-12
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,6 @@ impl<T> MaybeUninit<T> {
495495
#[inline(always)]
496496
#[rustc_diagnostic_item = "assume_init"]
497497
pub unsafe fn assume_init(self) -> T {
498-
#[cfg(bootstrap)]
499-
intrinsics::panic_if_uninhabited::<T>();
500-
#[cfg(not(bootstrap))]
501498
intrinsics::assert_inhabited::<T>();
502499
ManuallyDrop::into_inner(self.value)
503500
}
@@ -562,9 +559,6 @@ impl<T> MaybeUninit<T> {
562559
#[unstable(feature = "maybe_uninit_extra", issue = "63567")]
563560
#[inline(always)]
564561
pub unsafe fn read(&self) -> T {
565-
#[cfg(bootstrap)]
566-
intrinsics::panic_if_uninhabited::<T>();
567-
#[cfg(not(bootstrap))]
568562
intrinsics::assert_inhabited::<T>();
569563
self.as_ptr().read()
570564
}
@@ -627,9 +621,6 @@ impl<T> MaybeUninit<T> {
627621
#[unstable(feature = "maybe_uninit_ref", issue = "63568")]
628622
#[inline(always)]
629623
pub unsafe fn get_ref(&self) -> &T {
630-
#[cfg(bootstrap)]
631-
intrinsics::panic_if_uninhabited::<T>();
632-
#[cfg(not(bootstrap))]
633624
intrinsics::assert_inhabited::<T>();
634625
&*self.value
635626
}
@@ -748,9 +739,6 @@ impl<T> MaybeUninit<T> {
748739
#[unstable(feature = "maybe_uninit_ref", issue = "63568")]
749740
#[inline(always)]
750741
pub unsafe fn get_mut(&mut self) -> &mut T {
751-
#[cfg(bootstrap)]
752-
intrinsics::panic_if_uninhabited::<T>();
753-
#[cfg(not(bootstrap))]
754742
intrinsics::assert_inhabited::<T>();
755743
&mut *self.value
756744
}

src/libcore/mem/mod.rs

-8
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ pub fn size_of_val<T: ?Sized>(val: &T) -> usize {
378378
/// assert_eq!(13, unsafe { mem::size_of_val_raw(y) });
379379
/// ```
380380
#[inline]
381-
#[cfg(not(bootstrap))]
382381
#[unstable(feature = "layout_for_ptr", issue = "69835")]
383382
pub unsafe fn size_of_val_raw<T: ?Sized>(val: *const T) -> usize {
384383
intrinsics::size_of_val(val)
@@ -509,7 +508,6 @@ pub fn align_of_val<T: ?Sized>(val: &T) -> usize {
509508
/// assert_eq!(4, unsafe { mem::align_of_val_raw(&5i32) });
510509
/// ```
511510
#[inline]
512-
#[cfg(not(bootstrap))]
513511
#[unstable(feature = "layout_for_ptr", issue = "69835")]
514512
pub unsafe fn align_of_val_raw<T: ?Sized>(val: *const T) -> usize {
515513
intrinsics::min_align_of_val(val)
@@ -621,10 +619,7 @@ pub const fn needs_drop<T>() -> bool {
621619
#[allow(deprecated)]
622620
#[rustc_diagnostic_item = "mem_zeroed"]
623621
pub unsafe fn zeroed<T>() -> T {
624-
#[cfg(not(bootstrap))]
625622
intrinsics::assert_zero_valid::<T>();
626-
#[cfg(bootstrap)]
627-
intrinsics::panic_if_uninhabited::<T>();
628623
MaybeUninit::zeroed().assume_init()
629624
}
630625

@@ -657,10 +652,7 @@ pub unsafe fn zeroed<T>() -> T {
657652
#[allow(deprecated)]
658653
#[rustc_diagnostic_item = "mem_uninitialized"]
659654
pub unsafe fn uninitialized<T>() -> T {
660-
#[cfg(not(bootstrap))]
661655
intrinsics::assert_uninit_valid::<T>();
662-
#[cfg(bootstrap)]
663-
intrinsics::panic_if_uninhabited::<T>();
664656
MaybeUninit::uninit().assume_init()
665657
}
666658

src/libcore/ops/deref.rs

-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ impl<T: ?Sized> Deref for &T {
8181
}
8282
}
8383

84-
#[cfg(not(bootstrap))]
8584
#[stable(feature = "rust1", since = "1.0.0")]
8685
impl<T: ?Sized> !DerefMut for &T {}
8786

src/libcore/ops/index.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub trait Index<Idx: ?Sized> {
6565

6666
/// Performs the indexing (`container[index]`) operation.
6767
#[stable(feature = "rust1", since = "1.0.0")]
68-
#[cfg_attr(not(bootstrap), track_caller)]
68+
#[track_caller]
6969
fn index(&self, index: Idx) -> &Self::Output;
7070
}
7171

@@ -167,6 +167,6 @@ see chapter in The Book <https://doc.rust-lang.org/book/ch08-02-strings.html#ind
167167
pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
168168
/// Performs the mutable indexing (`container[index]`) operation.
169169
#[stable(feature = "rust1", since = "1.0.0")]
170-
#[cfg_attr(not(bootstrap), track_caller)]
170+
#[track_caller]
171171
fn index_mut(&mut self, index: Idx) -> &mut Self::Output;
172172
}

0 commit comments

Comments
 (0)