Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit dc1d9d5

Browse files
committed
Auto merge of rust-lang#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 f361413 + 652f79e commit dc1d9d5

File tree

21 files changed

+447
-425
lines changed

21 files changed

+447
-425
lines changed

compiler/rustc_const_eval/src/interpret/intern.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ use super::{
3030
use crate::const_eval;
3131

3232
pub trait CompileTimeMachine<'mir, 'tcx, T> = Machine<
33-
'mir,
34-
'tcx,
35-
MemoryKind = T,
36-
Provenance = AllocId,
37-
ExtraFnVal = !,
38-
FrameExtra = (),
39-
AllocExtra = (),
40-
MemoryMap = FxIndexMap<AllocId, (MemoryKind<T>, Allocation)>,
41-
>;
33+
'mir,
34+
'tcx,
35+
MemoryKind = T,
36+
Provenance = AllocId,
37+
ExtraFnVal = !,
38+
FrameExtra = (),
39+
AllocExtra = (),
40+
MemoryMap = FxIndexMap<AllocId, (MemoryKind<T>, Allocation)>,
41+
>;
4242

4343
struct InternVisitor<'rt, 'mir, 'tcx, M: CompileTimeMachine<'mir, 'tcx, const_eval::MemoryKind>> {
4444
/// The ectx from which we intern.

compiler/rustc_data_structures/src/obligation_forest/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ pub trait ForestObligation: Clone + Debug {
9595
pub trait ObligationProcessor {
9696
type Obligation: ForestObligation;
9797
type Error: Debug;
98-
type OUT: OutcomeTrait<
99-
Obligation = Self::Obligation,
100-
Error = Error<Self::Obligation, Self::Error>,
101-
>;
98+
type OUT: OutcomeTrait<Obligation = Self::Obligation, Error = Error<Self::Obligation, Self::Error>>;
10299

103100
fn needs_process_obligation(&self, obligation: &Self::Obligation) -> bool;
104101

compiler/rustc_feature/src/accepted.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ declare_features! (
4949
/// Allows `#[target_feature(...)]` on aarch64 platforms
5050
(accepted, aarch64_target_feature, "1.61.0", Some(44839), None),
5151
/// Allows using the `efiapi` ABI.
52-
(accepted, abi_efiapi, "CURRENT_RUSTC_VERSION", Some(65815), None),
52+
(accepted, abi_efiapi, "1.68.0", Some(65815), None),
5353
/// Allows the sysV64 ABI to be specified on all platforms
5454
/// instead of just the platforms on which it is the C ABI.
5555
(accepted, abi_sysv64, "1.24.0", Some(36167), None),
@@ -129,7 +129,7 @@ declare_features! (
129129
/// Allows `crate` in paths.
130130
(accepted, crate_in_paths, "1.30.0", Some(45477), None),
131131
/// Allows rustc to inject a default alloc_error_handler
132-
(accepted, default_alloc_error_handler, "CURRENT_RUSTC_VERSION", Some(66741), None),
132+
(accepted, default_alloc_error_handler, "1.68.0", Some(66741), None),
133133
/// Allows using assigning a default type to type parameters in algebraic data type definitions.
134134
(accepted, default_type_params, "1.0.0", None, None),
135135
/// Allows `#[deprecated]` attribute.
@@ -164,7 +164,7 @@ declare_features! (
164164
/// Allows access to crate names passed via `--extern` through prelude.
165165
(accepted, extern_prelude, "1.30.0", Some(44660), None),
166166
/// Allows using F16C intrinsics from `core::arch::{x86, x86_64}`.
167-
(accepted, f16c_target_feature, "CURRENT_RUSTC_VERSION", Some(44839), None),
167+
(accepted, f16c_target_feature, "1.68.0", Some(44839), None),
168168
/// Allows field shorthands (`x` meaning `x: x`) in struct literal expressions.
169169
(accepted, field_init_shorthand, "1.17.0", Some(37340), None),
170170
/// Allows `#[must_use]` on functions, and introduces must-use operators (RFC 1940).

compiler/rustc_feature/src/active.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ declare_features! (
342342
/// Allows `async {}` expressions in const contexts.
343343
(active, const_async_blocks, "1.53.0", Some(85368), None),
344344
/// Allows `const || {}` closures in const contexts.
345-
(incomplete, const_closures, "CURRENT_RUSTC_VERSION", Some(106003), None),
345+
(incomplete, const_closures, "1.68.0", Some(106003), None),
346346
/// Allows limiting the evaluation steps of const expressions
347347
(active, const_eval_limit, "1.43.0", Some(67217), None),
348348
/// Allows the definition of `const extern fn` and `const unsafe extern fn`.

library/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.

library/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 {

library/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.

library/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.

library/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.

library/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;

0 commit comments

Comments
 (0)