Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump boostrap compiler to new beta #139279

Merged
merged 7 commits into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ mod helper {
use super::*;
pub(super) type ObligationTreeIdGenerator = impl Iterator<Item = ObligationTreeId>;
impl<O: ForestObligation> ObligationForest<O> {
#[cfg_attr(not(bootstrap), define_opaque(ObligationTreeIdGenerator))]
#[define_opaque(ObligationTreeIdGenerator)]
pub fn new() -> ObligationForest<O> {
ObligationForest {
nodes: vec![],
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_error_messages/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ pub type LazyFallbackBundle = Arc<LazyLock<FluentBundle, impl FnOnce() -> Fluent

/// Return the default `FluentBundle` with standard "en-US" diagnostic messages.
#[instrument(level = "trace", skip(resources))]
#[cfg_attr(not(bootstrap), define_opaque(LazyFallbackBundle))]
#[define_opaque(LazyFallbackBundle)]
pub fn fallback_fluent_bundle(
resources: Vec<&'static str>,
with_directionality_markers: bool,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ declare_features! (
/// Allows using `const` operands in inline assembly.
(accepted, asm_const, "1.82.0", Some(93332)),
/// Allows using `label` operands in inline assembly.
(accepted, asm_goto, "CURRENT_RUSTC_VERSION", Some(119364)),
(accepted, asm_goto, "1.87.0", Some(119364)),
/// Allows using `sym` operands in inline assembly.
(accepted, asm_sym, "1.66.0", Some(93333)),
/// Allows the definition of associated constants in `trait` or `impl` blocks.
Expand Down Expand Up @@ -332,7 +332,7 @@ declare_features! (
/// Allows `use<'a, 'b, A, B>` in `impl Trait + use<...>` for precise capture of generic args.
(accepted, precise_capturing, "1.82.0", Some(123432)),
/// Allows `use<..>` precise capturign on impl Trait in traits.
(accepted, precise_capturing_in_traits, "CURRENT_RUSTC_VERSION", Some(130044)),
(accepted, precise_capturing_in_traits, "1.87.0", Some(130044)),
/// Allows procedural macros in `proc-macro` crates.
(accepted, proc_macro, "1.29.0", Some(38356)),
/// Allows multi-segment paths in attributes and derives.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_feature/src/removed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ declare_features! (
/// Allows unnamed fields of struct and union type
(removed, unnamed_fields, "1.83.0", Some(49804), Some("feature needs redesign")),
(removed, unsafe_no_drop_flag, "1.0.0", None, None),
(removed, unsized_tuple_coercion, "CURRENT_RUSTC_VERSION", Some(42877),
(removed, unsized_tuple_coercion, "1.87.0", Some(42877),
Some("The feature restricts possible layouts for tuples, and this restriction is not worth it.")),
/// Allows `union` fields that don't implement `Copy` as long as they don't have any drop glue.
(removed, untagged_unions, "1.13.0", Some(55149),
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ declare_features! (
/// Allows `dyn* Trait` objects.
(incomplete, dyn_star, "1.65.0", Some(102425)),
/// Allows the .use postfix syntax `x.use` and use closures `use |x| { ... }`
(incomplete, ergonomic_clones, "CURRENT_RUSTC_VERSION", Some(132290)),
(incomplete, ergonomic_clones, "1.87.0", Some(132290)),
/// Allows exhaustive pattern matching on types that contain uninhabited types.
(unstable, exhaustive_patterns, "1.13.0", Some(51085)),
/// Allows explicit tail calls via `become` expression.
Expand Down Expand Up @@ -511,7 +511,7 @@ declare_features! (
/// Allows generic parameters and where-clauses on free & associated const items.
(incomplete, generic_const_items, "1.73.0", Some(113521)),
/// Allows the type of const generics to depend on generic parameters
(incomplete, generic_const_parameter_types, "CURRENT_RUSTC_VERSION", Some(137626)),
(incomplete, generic_const_parameter_types, "1.87.0", Some(137626)),
/// Allows any generic constants being used as pattern type range ends
(incomplete, generic_pattern_types, "1.86.0", Some(136574)),
/// Allows registering static items globally, possibly across crates, to iterate over at runtime.
Expand Down Expand Up @@ -602,7 +602,7 @@ declare_features! (
/// Allows macro attributes on expressions, statements and non-inline modules.
(unstable, proc_macro_hygiene, "1.30.0", Some(54727)),
/// Allows the use of raw-dylibs on ELF platforms
(incomplete, raw_dylib_elf, "CURRENT_RUSTC_VERSION", Some(135694)),
(incomplete, raw_dylib_elf, "1.87.0", Some(135694)),
/// Makes `&` and `&mut` patterns eat only one layer of references in Rust 2024.
(incomplete, ref_pat_eat_one_layer_2024, "1.79.0", Some(123076)),
/// Makes `&` and `&mut` patterns eat only one layer of references in Rust 2024—structural variant
Expand Down Expand Up @@ -664,14 +664,14 @@ declare_features! (
/// Allows using the `#[used(linker)]` (or `#[used(compiler)]`) attribute.
(unstable, used_with_arg, "1.60.0", Some(93798)),
/// Allows use of attributes in `where` clauses.
(unstable, where_clause_attrs, "CURRENT_RUSTC_VERSION", Some(115590)),
(unstable, where_clause_attrs, "1.87.0", Some(115590)),
/// Allows use of x86 `AMX` target-feature attributes and intrinsics
(unstable, x86_amx_intrinsics, "1.81.0", Some(126622)),
/// Allows use of the `xop` target-feature
(unstable, xop_target_feature, "1.81.0", Some(127208)),
/// Allows `do yeet` expressions
(unstable, yeet_expr, "1.62.0", Some(96373)),
(unstable, yield_expr, "CURRENT_RUSTC_VERSION", Some(43122)),
(unstable, yield_expr, "1.87.0", Some(43122)),
// !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
// Features are listed in alphabetical order. Tidy will fail if you don't keep it this way.
// !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_middle/src/mir/terminator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ mod helper {
/// Like [`SwitchTargets::target_for_value`], but returning the same type as
/// [`Terminator::successors`].
#[inline]
#[cfg_attr(not(bootstrap), define_opaque(Successors))]
#[define_opaque(Successors)]
pub fn successors_for_value(&self, value: u128) -> Successors<'_> {
let target = self.target_for_value(value);
(&[]).into_iter().copied().chain(Some(target))
Expand All @@ -463,7 +463,7 @@ mod helper {

impl<'tcx> TerminatorKind<'tcx> {
#[inline]
#[cfg_attr(not(bootstrap), define_opaque(Successors))]
#[define_opaque(Successors)]
pub fn successors(&self) -> Successors<'_> {
use self::TerminatorKind::*;
match *self {
Expand Down Expand Up @@ -502,7 +502,7 @@ mod helper {
}

#[inline]
#[cfg_attr(not(bootstrap), define_opaque(SuccessorsMut))]
#[define_opaque(SuccessorsMut)]
pub fn successors_mut(&mut self) -> SuccessorsMut<'_> {
use self::TerminatorKind::*;
match *self {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_middle/src/query/erase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub trait EraseType: Copy {
pub type Erase<T: EraseType> = Erased<impl Copy>;

#[inline(always)]
#[cfg_attr(not(bootstrap), define_opaque(Erase))]
#[define_opaque(Erase)]
pub fn erase<T: EraseType>(src: T) -> Erase<T> {
// Ensure the sizes match
const {
Expand All @@ -49,7 +49,7 @@ pub fn erase<T: EraseType>(src: T) -> Erase<T> {

/// Restores an erased value.
#[inline(always)]
#[cfg_attr(not(bootstrap), define_opaque(Erase))]
#[define_opaque(Erase)]
pub fn restore<T: EraseType>(value: Erase<T>) -> T {
let value: Erased<<T as EraseType>::Result> = value;
// See comment in `erase` for why we use `transmute_unchecked`.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_next_trait_solver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// tidy-alphabetical-start
#![allow(rustc::usage_of_type_ir_inherent)]
#![cfg_attr(not(bootstrap), allow(rustc::usage_of_type_ir_traits))]
#![allow(rustc::usage_of_type_ir_traits)]
// tidy-alphabetical-end

pub mod canonicalizer;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_type_ir/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// tidy-alphabetical-start
#![allow(rustc::usage_of_ty_tykind)]
#![allow(rustc::usage_of_type_ir_inherent)]
#![allow(rustc::usage_of_type_ir_traits)]
#![cfg_attr(
feature = "nightly",
feature(associated_type_defaults, never_type, rustc_attrs, negative_impls)
)]
#![cfg_attr(feature = "nightly", allow(internal_features))]
#![cfg_attr(not(bootstrap), allow(rustc::usage_of_type_ir_traits))]
// tidy-alphabetical-end

extern crate self as rustc_type_ir;
Expand Down
14 changes: 7 additions & 7 deletions library/alloc/src/alloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ unsafe extern "Rust" {
// otherwise.
#[rustc_allocator]
#[rustc_nounwind]
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
#[rustc_std_internal_symbol]
fn __rust_alloc(size: usize, align: usize) -> *mut u8;
#[rustc_deallocator]
#[rustc_nounwind]
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
#[rustc_std_internal_symbol]
fn __rust_dealloc(ptr: *mut u8, size: usize, align: usize);
#[rustc_reallocator]
#[rustc_nounwind]
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
#[rustc_std_internal_symbol]
fn __rust_realloc(ptr: *mut u8, old_size: usize, align: usize, new_size: usize) -> *mut u8;
#[rustc_allocator_zeroed]
#[rustc_nounwind]
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
#[rustc_std_internal_symbol]
fn __rust_alloc_zeroed(size: usize, align: usize) -> *mut u8;

#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
#[rustc_std_internal_symbol]
static __rust_no_alloc_shim_is_unstable: u8;
}

Expand Down Expand Up @@ -360,7 +360,7 @@ unsafe extern "Rust" {
// This is the magic symbol to call the global alloc error handler. rustc generates
// it to call `__rg_oom` if there is a `#[alloc_error_handler]`, or to call the
// default implementations below (`__rdl_oom`) otherwise.
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
#[rustc_std_internal_symbol]
fn __rust_alloc_error_handler(size: usize, align: usize) -> !;
}

Expand Down Expand Up @@ -427,7 +427,7 @@ pub mod __alloc_error_handler {
unsafe extern "Rust" {
// This symbol is emitted by rustc next to __rust_alloc_error_handler.
// Its value depends on the -Zoom={panic,abort} compiler option.
#[cfg_attr(not(bootstrap), rustc_std_internal_symbol)]
#[rustc_std_internal_symbol]
static __rust_alloc_error_handler_should_panic: u8;
}

Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ impl<T, A: Allocator> Box<mem::MaybeUninit<T>, A> {
/// assert_eq!(*x, i);
/// }
/// ```
#[stable(feature = "box_uninit_write", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "box_uninit_write", since = "1.87.0")]
#[inline]
pub fn write(mut boxed: Self, value: T) -> Box<T, A> {
unsafe {
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/collections/btree/set_val.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub(super) struct SetValZST;
/// Returns `true` only for type `SetValZST`, `false` for all other types (blanket implementation).
/// `TypeId` requires a `'static` lifetime, use of this trait avoids that restriction.
///
/// [`TypeId`]: std::any::TypeId
/// [`TypeId`]: core::any::TypeId
pub(super) trait IsSetVal {
fn is_set_val() -> bool;
}
Expand Down
8 changes: 4 additions & 4 deletions library/alloc/src/collections/linked_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ impl<T, A: Allocator> LinkedList<T, A> {
/// assert_eq!(evens.into_iter().collect::<Vec<_>>(), vec![2, 4, 6, 8, 14]);
/// assert_eq!(odds.into_iter().collect::<Vec<_>>(), vec![1, 3, 5, 9, 11, 13, 15]);
/// ```
#[stable(feature = "extract_if", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "extract_if", since = "1.87.0")]
pub fn extract_if<F>(&mut self, filter: F) -> ExtractIf<'_, T, F, A>
where
F: FnMut(&mut T) -> bool,
Expand Down Expand Up @@ -1931,7 +1931,7 @@ impl<'a, T, A: Allocator> CursorMut<'a, T, A> {
}

/// An iterator produced by calling `extract_if` on LinkedList.
#[stable(feature = "extract_if", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "extract_if", since = "1.87.0")]
#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct ExtractIf<
'a,
Expand All @@ -1946,7 +1946,7 @@ pub struct ExtractIf<
old_len: usize,
}

#[stable(feature = "extract_if", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "extract_if", since = "1.87.0")]
impl<T, F, A: Allocator> Iterator for ExtractIf<'_, T, F, A>
where
F: FnMut(&mut T) -> bool,
Expand Down Expand Up @@ -1975,7 +1975,7 @@ where
}
}

#[stable(feature = "extract_if", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "extract_if", since = "1.87.0")]
impl<T: fmt::Debug, F> fmt::Debug for ExtractIf<'_, T, F> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("ExtractIf").field(&self.list).finish()
Expand Down
20 changes: 10 additions & 10 deletions library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ impl String {
#[inline]
#[must_use = "`self` will be dropped if the result is not used"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
#[rustc_allow_const_fn_unstable(const_precise_live_drops)]
pub const fn into_bytes(self) -> Vec<u8> {
self.vec
Expand All @@ -1062,7 +1062,7 @@ impl String {
#[must_use]
#[stable(feature = "string_as_str", since = "1.7.0")]
#[rustc_diagnostic_item = "string_as_str"]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
pub const fn as_str(&self) -> &str {
// SAFETY: String contents are stipulated to be valid UTF-8, invalid contents are an error
// at construction.
Expand All @@ -1085,7 +1085,7 @@ impl String {
#[must_use]
#[stable(feature = "string_as_str", since = "1.7.0")]
#[rustc_diagnostic_item = "string_as_mut_str"]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
pub const fn as_mut_str(&mut self) -> &mut str {
// SAFETY: String contents are stipulated to be valid UTF-8, invalid contents are an error
// at construction.
Expand Down Expand Up @@ -1134,7 +1134,7 @@ impl String {
/// assert_eq!(string, "abcdecdeabecde");
/// ```
#[cfg(not(no_global_oom_handling))]
#[stable(feature = "string_extend_from_within", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "string_extend_from_within", since = "1.87.0")]
pub fn extend_from_within<R>(&mut self, src: R)
where
R: RangeBounds<usize>,
Expand All @@ -1159,7 +1159,7 @@ impl String {
#[inline]
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
pub const fn capacity(&self) -> usize {
self.vec.capacity()
}
Expand Down Expand Up @@ -1425,7 +1425,7 @@ impl String {
#[inline]
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
pub const fn as_bytes(&self) -> &[u8] {
self.vec.as_slice()
}
Expand Down Expand Up @@ -1779,7 +1779,7 @@ impl String {
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
pub const unsafe fn as_mut_vec(&mut self) -> &mut Vec<u8> {
&mut self.vec
}
Expand All @@ -1801,7 +1801,7 @@ impl String {
#[inline]
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
#[rustc_confusables("length", "size")]
pub const fn len(&self) -> usize {
self.vec.len()
Expand All @@ -1821,7 +1821,7 @@ impl String {
#[inline]
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "const_vec_string_slice", since = "1.87.0")]
pub const fn is_empty(&self) -> bool {
self.len() == 0
}
Expand Down Expand Up @@ -3140,7 +3140,7 @@ impl From<String> for Vec<u8> {
}
}

#[stable(feature = "try_from_vec_u8_for_string", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "try_from_vec_u8_for_string", since = "1.87.0")]
impl TryFrom<Vec<u8>> for String {
type Error = FromUtf8Error;
/// Converts the given [`Vec<u8>`] into a [`String`] if it contains valid UTF-8 data.
Expand Down
6 changes: 3 additions & 3 deletions library/alloc/src/vec/extract_if.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::alloc::{Allocator, Global};
/// let mut v = vec![0, 1, 2];
/// let iter: std::vec::ExtractIf<'_, _, _> = v.extract_if(.., |x| *x % 2 == 0);
/// ```
#[stable(feature = "extract_if", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "extract_if", since = "1.87.0")]
#[derive(Debug)]
#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct ExtractIf<
Expand Down Expand Up @@ -57,7 +57,7 @@ impl<'a, T, F, A: Allocator> ExtractIf<'a, T, F, A> {
}
}

#[stable(feature = "extract_if", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "extract_if", since = "1.87.0")]
impl<T, F, A: Allocator> Iterator for ExtractIf<'_, T, F, A>
where
F: FnMut(&mut T) -> bool,
Expand Down Expand Up @@ -93,7 +93,7 @@ where
}
}

#[stable(feature = "extract_if", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "extract_if", since = "1.87.0")]
impl<T, F, A: Allocator> Drop for ExtractIf<'_, T, F, A> {
fn drop(&mut self) {
unsafe {
Expand Down
Loading
Loading