Skip to content

Commit 338cfd3

Browse files
committed
Auto merge of #103858 - Mark-Simulacrum:bump-bootstrap, r=pietroalbini
Bump bootstrap compiler to 1.66 This PR: - Bumps version placeholders to release - Bumps to latest beta - cfg-steps code r? `@pietroalbini`
2 parents 7b513af + 01a2a57 commit 338cfd3

File tree

29 files changed

+446
-453
lines changed

29 files changed

+446
-453
lines changed

compiler/rustc_ast/src/visit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ pub trait Visitor<'ast>: Sized {
251251
macro_rules! walk_list {
252252
($visitor: expr, $method: ident, $list: expr $(, $($extra_args: expr),* )?) => {
253253
{
254-
#[cfg_attr(not(bootstrap), allow(for_loops_over_fallibles))]
254+
#[allow(for_loops_over_fallibles)]
255255
for elem in $list {
256256
$visitor.$method(elem $(, $($extra_args,)* )?)
257257
}

compiler/rustc_errors/src/diagnostic.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ impl<'source> Into<FluentValue<'source>> for DiagnosticArgValue<'source> {
6464

6565
/// Trait implemented by error types. This should not be implemented manually. Instead, use
6666
/// `#[derive(Subdiagnostic)]` -- see [rustc_macros::Subdiagnostic].
67-
#[cfg_attr(bootstrap, rustc_diagnostic_item = "AddSubdiagnostic")]
68-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "AddToDiagnostic")]
67+
#[rustc_diagnostic_item = "AddToDiagnostic"]
6968
pub trait AddToDiagnostic
7069
where
7170
Self: Sized,

compiler/rustc_errors/src/diagnostic_builder.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ use std::thread::panicking;
1616

1717
/// Trait implemented by error types. This should not be implemented manually. Instead, use
1818
/// `#[derive(Diagnostic)]` -- see [rustc_macros::Diagnostic].
19-
#[cfg_attr(bootstrap, rustc_diagnostic_item = "SessionDiagnostic")]
20-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "IntoDiagnostic")]
19+
#[rustc_diagnostic_item = "IntoDiagnostic"]
2120
pub trait IntoDiagnostic<'a, T: EmissionGuarantee = ErrorGuaranteed> {
2221
/// Write out as a diagnostic out of `Handler`.
2322
#[must_use]

compiler/rustc_feature/src/accepted.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ declare_features! (
5454
/// Allows using ADX intrinsics from `core::arch::{x86, x86_64}`.
5555
(accepted, adx_target_feature, "1.61.0", Some(44839), None),
5656
/// Allows explicit discriminants on non-unit enum variants.
57-
(accepted, arbitrary_enum_discriminant, "CURRENT_RUSTC_VERSION", Some(60553), None),
57+
(accepted, arbitrary_enum_discriminant, "1.66.0", Some(60553), None),
5858
/// Allows using `sym` operands in inline assembly.
59-
(accepted, asm_sym, "CURRENT_RUSTC_VERSION", Some(93333), None),
59+
(accepted, asm_sym, "1.66.0", Some(93333), None),
6060
/// Allows the definition of associated constants in `trait` or `impl` blocks.
6161
(accepted, associated_consts, "1.20.0", Some(29646), None),
6262
/// Allows using associated `type`s in `trait`s.
@@ -174,7 +174,7 @@ declare_features! (
174174
// FIXME: explain `globs`.
175175
(accepted, globs, "1.0.0", None, None),
176176
/// Allows using `..=X` as a pattern.
177-
(accepted, half_open_range_patterns, "CURRENT_RUSTC_VERSION", Some(67264), None),
177+
(accepted, half_open_range_patterns, "1.66.0", Some(67264), None),
178178
/// Allows using the `u128` and `i128` types.
179179
(accepted, i128_type, "1.26.0", Some(35118), None),
180180
/// Allows the use of `if let` expressions.

compiler/rustc_feature/src/active.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ declare_features! (
311311
/// Allows `async || body` closures.
312312
(active, async_closure, "1.37.0", Some(62290), None),
313313
/// Alows async functions to be declared, implemented, and used in traits.
314-
(incomplete, async_fn_in_trait, "CURRENT_RUSTC_VERSION", Some(91611), None),
314+
(incomplete, async_fn_in_trait, "1.66.0", Some(91611), None),
315315
/// Allows `extern "C-unwind" fn` to enable unwinding across ABI boundaries.
316316
(active, c_unwind, "1.52.0", Some(74990), None),
317317
/// Allows using C-variadics.
@@ -414,7 +414,7 @@ declare_features! (
414414
/// Allows non-trivial generic constants which have to have wfness manually propagated to callers
415415
(incomplete, generic_const_exprs, "1.56.0", Some(76560), None),
416416
/// Allows using `..=X` as a patterns in slices.
417-
(active, half_open_range_patterns_in_slices, "CURRENT_RUSTC_VERSION", Some(67264), None),
417+
(active, half_open_range_patterns_in_slices, "1.66.0", Some(67264), None),
418418
/// Allows `if let` guard in match arms.
419419
(active, if_let_guard, "1.47.0", Some(51114), None),
420420
/// Allows `impl Trait` as output type in `Fn` traits in return position of functions.

compiler/rustc_middle/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
#![feature(type_alias_impl_trait)]
4444
#![feature(associated_type_bounds)]
4545
#![feature(rustc_attrs)]
46-
#![cfg_attr(bootstrap, feature(half_open_range_patterns))]
4746
#![feature(control_flow_enum)]
4847
#![feature(associated_type_defaults)]
4948
#![feature(trusted_step)]

library/alloc/src/alloc.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,16 @@ extern "Rust" {
2828
// The rustc fork of LLVM 14 and earlier also special-cases these function names to be able to optimize them
2929
// like `malloc`, `realloc`, and `free`, respectively.
3030
#[rustc_allocator]
31-
#[cfg_attr(not(bootstrap), rustc_nounwind)]
32-
#[cfg_attr(bootstrap, rustc_allocator_nounwind)]
31+
#[rustc_nounwind]
3332
fn __rust_alloc(size: usize, align: usize) -> *mut u8;
3433
#[rustc_deallocator]
35-
#[cfg_attr(not(bootstrap), rustc_nounwind)]
36-
#[cfg_attr(bootstrap, rustc_allocator_nounwind)]
34+
#[rustc_nounwind]
3735
fn __rust_dealloc(ptr: *mut u8, size: usize, align: usize);
3836
#[rustc_reallocator]
39-
#[cfg_attr(not(bootstrap), rustc_nounwind)]
40-
#[cfg_attr(bootstrap, rustc_allocator_nounwind)]
37+
#[rustc_nounwind]
4138
fn __rust_realloc(ptr: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8;
4239
#[rustc_allocator_zeroed]
43-
#[cfg_attr(not(bootstrap), rustc_nounwind)]
44-
#[cfg_attr(bootstrap, rustc_allocator_nounwind)]
40+
#[rustc_nounwind]
4541
fn __rust_alloc_zeroed(size: usize, align: usize) -> *mut u8;
4642
}
4743

library/alloc/src/boxed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1661,7 +1661,7 @@ impl<T, const N: usize> TryFrom<Box<[T]>> for Box<[T; N]> {
16611661
}
16621662

16631663
#[cfg(not(no_global_oom_handling))]
1664-
#[stable(feature = "boxed_array_try_from_vec", since = "CURRENT_RUSTC_VERSION")]
1664+
#[stable(feature = "boxed_array_try_from_vec", since = "1.66.0")]
16651665
impl<T, const N: usize> TryFrom<Vec<T>> for Box<[T; N]> {
16661666
type Error = Vec<T>;
16671667

library/alloc/src/collections/btree/map.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ impl<K, V> BTreeMap<K, V> {
580580
/// map.insert(1, "a");
581581
/// ```
582582
#[stable(feature = "rust1", since = "1.0.0")]
583-
#[rustc_const_stable(feature = "const_btree_new", since = "CURRENT_RUSTC_VERSION")]
583+
#[rustc_const_stable(feature = "const_btree_new", since = "1.66.0")]
584584
#[must_use]
585585
pub const fn new() -> BTreeMap<K, V> {
586586
BTreeMap { root: None, length: 0, alloc: ManuallyDrop::new(Global), _marker: PhantomData }
@@ -711,7 +711,7 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
711711
/// map.insert(2, "a");
712712
/// assert_eq!(map.first_key_value(), Some((&1, &"b")));
713713
/// ```
714-
#[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")]
714+
#[stable(feature = "map_first_last", since = "1.66.0")]
715715
pub fn first_key_value(&self) -> Option<(&K, &V)>
716716
where
717717
K: Ord,
@@ -739,7 +739,7 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
739739
/// assert_eq!(*map.get(&1).unwrap(), "first");
740740
/// assert_eq!(*map.get(&2).unwrap(), "b");
741741
/// ```
742-
#[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")]
742+
#[stable(feature = "map_first_last", since = "1.66.0")]
743743
pub fn first_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
744744
where
745745
K: Ord,
@@ -773,7 +773,7 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
773773
/// }
774774
/// assert!(map.is_empty());
775775
/// ```
776-
#[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")]
776+
#[stable(feature = "map_first_last", since = "1.66.0")]
777777
pub fn pop_first(&mut self) -> Option<(K, V)>
778778
where
779779
K: Ord,
@@ -796,7 +796,7 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
796796
/// map.insert(2, "a");
797797
/// assert_eq!(map.last_key_value(), Some((&2, &"a")));
798798
/// ```
799-
#[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")]
799+
#[stable(feature = "map_first_last", since = "1.66.0")]
800800
pub fn last_key_value(&self) -> Option<(&K, &V)>
801801
where
802802
K: Ord,
@@ -824,7 +824,7 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
824824
/// assert_eq!(*map.get(&1).unwrap(), "a");
825825
/// assert_eq!(*map.get(&2).unwrap(), "last");
826826
/// ```
827-
#[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")]
827+
#[stable(feature = "map_first_last", since = "1.66.0")]
828828
pub fn last_entry(&mut self) -> Option<OccupiedEntry<'_, K, V, A>>
829829
where
830830
K: Ord,
@@ -858,7 +858,7 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
858858
/// }
859859
/// assert!(map.is_empty());
860860
/// ```
861-
#[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")]
861+
#[stable(feature = "map_first_last", since = "1.66.0")]
862862
pub fn pop_last(&mut self) -> Option<(K, V)>
863863
where
864864
K: Ord,

library/alloc/src/collections/btree/set.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ impl<T> BTreeSet<T> {
343343
/// let mut set: BTreeSet<i32> = BTreeSet::new();
344344
/// ```
345345
#[stable(feature = "rust1", since = "1.0.0")]
346-
#[rustc_const_stable(feature = "const_btree_new", since = "CURRENT_RUSTC_VERSION")]
346+
#[rustc_const_stable(feature = "const_btree_new", since = "1.66.0")]
347347
#[must_use]
348348
pub const fn new() -> BTreeSet<T> {
349349
BTreeSet { map: BTreeMap::new() }
@@ -796,7 +796,7 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
796796
/// assert_eq!(set.first(), Some(&1));
797797
/// ```
798798
#[must_use]
799-
#[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")]
799+
#[stable(feature = "map_first_last", since = "1.66.0")]
800800
pub fn first(&self) -> Option<&T>
801801
where
802802
T: Ord,
@@ -822,7 +822,7 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
822822
/// assert_eq!(set.last(), Some(&2));
823823
/// ```
824824
#[must_use]
825-
#[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")]
825+
#[stable(feature = "map_first_last", since = "1.66.0")]
826826
pub fn last(&self) -> Option<&T>
827827
where
828828
T: Ord,
@@ -846,7 +846,7 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
846846
/// }
847847
/// assert!(set.is_empty());
848848
/// ```
849-
#[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")]
849+
#[stable(feature = "map_first_last", since = "1.66.0")]
850850
pub fn pop_first(&mut self) -> Option<T>
851851
where
852852
T: Ord,
@@ -870,7 +870,7 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
870870
/// }
871871
/// assert!(set.is_empty());
872872
/// ```
873-
#[stable(feature = "map_first_last", since = "CURRENT_RUSTC_VERSION")]
873+
#[stable(feature = "map_first_last", since = "1.66.0")]
874874
pub fn pop_last(&mut self) -> Option<T>
875875
where
876876
T: Ord,

library/core/src/default.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
/// ```
100100
#[cfg_attr(not(test), rustc_diagnostic_item = "Default")]
101101
#[stable(feature = "rust1", since = "1.0.0")]
102-
#[cfg_attr(not(bootstrap), const_trait)]
102+
#[const_trait]
103103
pub trait Default: Sized {
104104
/// Returns the "default value" for a type.
105105
///

library/core/src/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ impl Error for crate::char::ParseCharError {
493493
}
494494
}
495495

496-
#[stable(feature = "duration_checked_float", since = "CURRENT_RUSTC_VERSION")]
496+
#[stable(feature = "duration_checked_float", since = "1.66.0")]
497497
impl Error for crate::time::TryFromFloatSecsError {}
498498

499499
#[stable(feature = "frombyteswithnulerror_impls", since = "1.17.0")]

library/core/src/hint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ pub fn spin_loop() {
220220
///
221221
/// [`std::convert::identity`]: crate::convert::identity
222222
#[inline]
223-
#[stable(feature = "bench_black_box", since = "CURRENT_RUSTC_VERSION")]
223+
#[stable(feature = "bench_black_box", since = "1.66.0")]
224224
#[rustc_const_unstable(feature = "const_black_box", issue = "none")]
225225
pub const fn black_box<T>(dummy: T) -> T {
226226
crate::intrinsics::black_box(dummy)

0 commit comments

Comments
 (0)