Skip to content

Commit b2ce765

Browse files
committed
Auto merge of #107297 - Mark-Simulacrum:bump-bootstrap, r=pietroalbini
Bump bootstrap compiler to 1.68 This also changes our stage0.json to include the rustc component for the rustfmt pinned nightly toolchain, which is currently necessary due to rustfmt dynamically linking to that toolchain's librustc_driver and libstd. r? `@pietroalbini`
2 parents 9c2e5f7 + 8a2168b commit b2ce765

File tree

14 files changed

+18
-59
lines changed

14 files changed

+18
-59
lines changed

alloc/src/collections/vec_deque/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ impl<T> VecDeque<T> {
537537
/// ```
538538
#[inline]
539539
#[stable(feature = "rust1", since = "1.0.0")]
540-
#[rustc_const_stable(feature = "const_vec_deque_new", since = "CURRENT_RUSTC_VERSION")]
540+
#[rustc_const_stable(feature = "const_vec_deque_new", since = "1.68.0")]
541541
#[must_use]
542542
pub const fn new() -> VecDeque<T> {
543543
// FIXME: This should just be `VecDeque::new_in(Global)` once that hits stable.

alloc/src/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2549,7 +2549,7 @@ impl ToString for char {
25492549
}
25502550

25512551
#[cfg(not(no_global_oom_handling))]
2552-
#[stable(feature = "bool_to_string_specialization", since = "CURRENT_RUSTC_VERSION")]
2552+
#[stable(feature = "bool_to_string_specialization", since = "1.68.0")]
25532553
impl ToString for bool {
25542554
#[inline]
25552555
fn to_string(&self) -> String {

core/src/cmp.rs

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -798,16 +798,7 @@ pub trait Ord: Eq + PartialOrd<Self> {
798798
Self: Sized,
799799
Self: ~const Destruct,
800800
{
801-
#[cfg(not(bootstrap))]
802-
{
803-
max_by(self, other, Ord::cmp)
804-
}
805-
806-
#[cfg(bootstrap)]
807-
match self.cmp(&other) {
808-
Ordering::Less | Ordering::Equal => other,
809-
Ordering::Greater => self,
810-
}
801+
max_by(self, other, Ord::cmp)
811802
}
812803

813804
/// Compares and returns the minimum of two values.
@@ -828,16 +819,7 @@ pub trait Ord: Eq + PartialOrd<Self> {
828819
Self: Sized,
829820
Self: ~const Destruct,
830821
{
831-
#[cfg(not(bootstrap))]
832-
{
833-
min_by(self, other, Ord::cmp)
834-
}
835-
836-
#[cfg(bootstrap)]
837-
match self.cmp(&other) {
838-
Ordering::Less | Ordering::Equal => self,
839-
Ordering::Greater => other,
840-
}
822+
min_by(self, other, Ord::cmp)
841823
}
842824

843825
/// Restrict a value to a certain interval.
@@ -1234,23 +1216,7 @@ where
12341216
F: ~const Destruct,
12351217
K: ~const Destruct,
12361218
{
1237-
cfg_if! {
1238-
if #[cfg(bootstrap)] {
1239-
const fn imp<T, F: ~const FnMut(&T) -> K, K: ~const Ord>(
1240-
f: &mut F,
1241-
(v1, v2): (&T, &T),
1242-
) -> Ordering
1243-
where
1244-
T: ~const Destruct,
1245-
K: ~const Destruct,
1246-
{
1247-
f(v1).cmp(&f(v2))
1248-
}
1249-
min_by(v1, v2, ConstFnMutClosure::new(&mut f, imp))
1250-
} else {
1251-
min_by(v1, v2, const |v1, v2| f(v1).cmp(&f(v2)))
1252-
}
1253-
}
1219+
min_by(v1, v2, const |v1, v2| f(v1).cmp(&f(v2)))
12541220
}
12551221

12561222
/// Compares and returns the maximum of two values.

core/src/convert/num.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl_from! { u32, f64, #[stable(feature = "lossless_float_conv", since = "1.6.0"
169169
impl_from! { f32, f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")] }
170170

171171
// bool -> Float
172-
#[stable(feature = "float_from_bool", since = "CURRENT_RUSTC_VERSION")]
172+
#[stable(feature = "float_from_bool", since = "1.68.0")]
173173
#[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")]
174174
impl const From<bool> for f32 {
175175
/// Converts `bool` to `f32` losslessly.
@@ -178,7 +178,7 @@ impl const From<bool> for f32 {
178178
small as u8 as Self
179179
}
180180
}
181-
#[stable(feature = "float_from_bool", since = "CURRENT_RUSTC_VERSION")]
181+
#[stable(feature = "float_from_bool", since = "1.68.0")]
182182
#[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")]
183183
impl const From<bool> for f64 {
184184
/// Converts `bool` to `f64` losslessly.

core/src/intrinsics.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ use crate::marker::DiscriminantKind;
5858
use crate::marker::Tuple;
5959
use crate::mem;
6060

61-
#[cfg(not(bootstrap))]
6261
pub mod mir;
6362

6463
// These imports are used for simplifying intra-doc links
@@ -963,7 +962,6 @@ extern "rust-intrinsic" {
963962
/// This intrinsic does not have a stable counterpart.
964963
#[rustc_const_unstable(feature = "const_assert_type2", issue = "none")]
965964
#[rustc_safe_intrinsic]
966-
#[cfg(not(bootstrap))]
967965
pub fn assert_mem_uninitialized_valid<T>();
968966

969967
/// Gets a reference to a static `Location` indicating where it was called.

core/src/intrinsics/mir.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@
6060
//!
6161
//! # Examples
6262
//!
63-
#![cfg_attr(bootstrap, doc = "```rust,compile_fail")]
64-
#![cfg_attr(not(bootstrap), doc = "```rust")]
63+
//! ```rust
6564
//! #![feature(core_intrinsics, custom_mir)]
6665
//!
6766
//! extern crate core;
@@ -300,8 +299,7 @@ define!(
300299
///
301300
/// # Examples
302301
///
303-
#[cfg_attr(bootstrap, doc = "```rust,compile_fail")]
304-
#[cfg_attr(not(bootstrap), doc = "```rust")]
302+
/// ```rust
305303
/// #![feature(custom_mir, core_intrinsics)]
306304
///
307305
/// extern crate core;

core/src/iter/sources/once_with.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub struct OnceWith<F> {
7373
gen: Option<F>,
7474
}
7575

76-
#[stable(feature = "iter_once_with_debug", since = "CURRENT_RUSTC_VERSION")]
76+
#[stable(feature = "iter_once_with_debug", since = "1.68.0")]
7777
impl<F> fmt::Debug for OnceWith<F> {
7878
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
7979
if self.gen.is_some() {

core/src/iter/sources/repeat_with.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub struct RepeatWith<F> {
7878
repeater: F,
7979
}
8080

81-
#[stable(feature = "iterator_repeat_with_debug", since = "CURRENT_RUSTC_VERSION")]
81+
#[stable(feature = "iterator_repeat_with_debug", since = "1.68.0")]
8282
impl<F> fmt::Debug for RepeatWith<F> {
8383
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8484
f.debug_struct("RepeatWith").finish_non_exhaustive()

core/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
#![feature(cfg_sanitize)]
193193
#![feature(cfg_target_has_atomic)]
194194
#![feature(cfg_target_has_atomic_equal_alignment)]
195-
#![cfg_attr(not(bootstrap), feature(const_closures))]
195+
#![feature(const_closures)]
196196
#![feature(const_fn_floating_point_arithmetic)]
197197
#![feature(const_mut_refs)]
198198
#![feature(const_precise_live_drops)]
@@ -250,7 +250,6 @@
250250
#![feature(sse4a_target_feature)]
251251
#![feature(tbm_target_feature)]
252252
#![feature(wasm_target_feature)]
253-
#![cfg_attr(bootstrap, feature(f16c_target_feature))]
254253

255254
// allow using `core::` in intra-doc links
256255
#[allow(unused_extern_crates)]

core/src/mem/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,6 @@ pub unsafe fn zeroed<T>() -> T {
682682
pub unsafe fn uninitialized<T>() -> T {
683683
// SAFETY: the caller must guarantee that an uninitialized value is valid for `T`.
684684
unsafe {
685-
#[cfg(not(bootstrap))] // If the compiler hits this itself then it deserves the UB.
686685
intrinsics::assert_mem_uninitialized_valid::<T>();
687686
let mut val = MaybeUninit::<T>::uninit();
688687

0 commit comments

Comments
 (0)