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 bootstrap compiler to latest beta #124521

Merged
merged 5 commits into from
May 2, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion compiler/rustc_ast/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#![doc(rust_logo)]
#![allow(internal_features)]
#![feature(rustdoc_internals)]
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
#![feature(associated_type_defaults)]
#![feature(box_patterns)]
#![feature(if_let_guard)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#![feature(rustdoc_internals)]
#![doc(rust_logo)]
#![feature(assert_matches)]
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
#![feature(box_patterns)]
#![feature(control_flow_enum)]
#![feature(let_chains)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_gcc/example/mini_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ pub fn panic(_msg: &'static str) -> ! {

macro_rules! panic_const {
($($lang:ident = $message:expr,)+) => {
#[cfg(not(bootstrap))]
pub mod panic_const {
use super::*;

Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_gcc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
trusted_len,
hash_raw_entry
)]
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
#![allow(broken_intra_doc_links)]
#![recursion_limit = "256"]
#![warn(rust_2018_idioms)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_ssa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
#![feature(box_patterns)]
#![feature(if_let_guard)]
#![feature(let_chains)]
Expand Down
6 changes: 6 additions & 0 deletions compiler/rustc_data_structures/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ use std::collections::HashMap;
use std::hash::{BuildHasher, Hash};

mod lock;
#[doc(no_inline)]
pub use lock::{Lock, LockGuard, Mode};

mod worker_local;
Expand Down Expand Up @@ -199,10 +200,15 @@ cfg_match! {

pub use std::rc::Rc as Lrc;
pub use std::rc::Weak as Weak;
#[doc(no_inline)]
pub use std::cell::Ref as ReadGuard;
#[doc(no_inline)]
pub use std::cell::Ref as MappedReadGuard;
#[doc(no_inline)]
pub use std::cell::RefMut as WriteGuard;
#[doc(no_inline)]
pub use std::cell::RefMut as MappedWriteGuard;
#[doc(no_inline)]
pub use std::cell::RefMut as MappedLockGuard;

pub use std::cell::OnceCell as OnceLock;
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_expand/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![doc(rust_logo)]
#![feature(rustdoc_internals)]
#![feature(array_windows)]
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
#![feature(associated_type_defaults)]
#![feature(if_let_guard)]
#![feature(let_chains)]
Expand Down
10 changes: 5 additions & 5 deletions compiler/rustc_feature/src/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ declare_features! (
/// Allows the definition of associated constants in `trait` or `impl` blocks.
(accepted, associated_consts, "1.20.0", Some(29646)),
/// Allows the user of associated type bounds.
(accepted, associated_type_bounds, "CURRENT_RUSTC_VERSION", Some(52662)),
(accepted, associated_type_bounds, "1.79.0", Some(52662)),
/// Allows using associated `type`s in `trait`s.
(accepted, associated_types, "1.0.0", None),
/// Allows free and inherent `async fn`s, `async` blocks, and `<expr>.await` expressions.
Expand Down Expand Up @@ -99,7 +99,7 @@ declare_features! (
/// Allows using the CMPXCHG16B target feature.
(accepted, cmpxchg16b_target_feature, "1.69.0", Some(44839)),
/// Allows use of the `#[collapse_debuginfo]` attribute.
(accepted, collapse_debuginfo, "CURRENT_RUSTC_VERSION", Some(100758)),
(accepted, collapse_debuginfo, "1.79.0", Some(100758)),
/// Allows usage of the `compile_error!` macro.
(accepted, compile_error, "1.20.0", Some(40872)),
/// Allows `impl Trait` in function return types.
Expand Down Expand Up @@ -208,13 +208,13 @@ declare_features! (
/// Allows referencing `Self` and projections in impl-trait.
(accepted, impl_trait_projections, "1.74.0", Some(103532)),
/// Allows using imported `main` function
(accepted, imported_main, "CURRENT_RUSTC_VERSION", Some(28937)),
(accepted, imported_main, "1.79.0", Some(28937)),
/// Allows using `a..=b` and `..=b` as inclusive range syntaxes.
(accepted, inclusive_range_syntax, "1.26.0", Some(28237)),
/// Allows inferring outlives requirements (RFC 2093).
(accepted, infer_outlives_requirements, "1.30.0", Some(44493)),
/// Allow anonymous constants from an inline `const` block
(accepted, inline_const, "CURRENT_RUSTC_VERSION", Some(76001)),
(accepted, inline_const, "1.79.0", Some(76001)),
/// Allows irrefutable patterns in `if let` and `while let` statements (RFC 2086).
(accepted, irrefutable_let_patterns, "1.33.0", Some(44495)),
/// Allows `#[instruction_set(_)]` attribute.
Expand Down Expand Up @@ -360,7 +360,7 @@ declare_features! (
/// Allows macros to appear in the type position.
(accepted, type_macros, "1.13.0", Some(27245)),
/// Allows using type privacy lints (`private_interfaces`, `private_bounds`, `unnameable_types`).
(accepted, type_privacy_lints, "CURRENT_RUSTC_VERSION", Some(48054)),
(accepted, type_privacy_lints, "1.79.0", Some(48054)),
/// Allows `const _: TYPE = VALUE`.
(accepted, underscore_const_names, "1.37.0", Some(54912)),
/// Allows `use path as _;` and `extern crate c as _;`.
Expand Down
18 changes: 9 additions & 9 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ declare_features! (
/// Set the maximum pattern complexity allowed (not limited by default).
(internal, pattern_complexity, "1.78.0", None),
/// Allows using pattern types.
(internal, pattern_types, "CURRENT_RUSTC_VERSION", Some(123646)),
(internal, pattern_types, "1.79.0", Some(123646)),
/// Allows using `#[prelude_import]` on glob `use` items.
(internal, prelude_import, "1.2.0", None),
/// Used to identify crates that contain the profiler runtime.
Expand Down Expand Up @@ -384,7 +384,7 @@ declare_features! (
/// Allows `cfg(target_thread_local)`.
(unstable, cfg_target_thread_local, "1.7.0", Some(29594)),
/// Allows the use of `#[cfg(ub_checks)` to check if UB checks are enabled.
(unstable, cfg_ub_checks, "CURRENT_RUSTC_VERSION", Some(123499)),
(unstable, cfg_ub_checks, "1.79.0", Some(123499)),
/// Allow conditional compilation depending on rust version
(unstable, cfg_version, "1.45.0", Some(64796)),
/// Allows to use the `#[cfi_encoding = ""]` attribute.
Expand Down Expand Up @@ -439,7 +439,7 @@ declare_features! (
/// Allows having using `suggestion` in the `#[deprecated]` attribute.
(unstable, deprecated_suggestion, "1.61.0", Some(94785)),
/// Allows deref patterns.
(incomplete, deref_patterns, "CURRENT_RUSTC_VERSION", Some(87121)),
(incomplete, deref_patterns, "1.79.0", Some(87121)),
/// Controls errors in trait implementations.
(unstable, do_not_recommend, "1.67.0", Some(51992)),
/// Tells rustdoc to automatically generate `#[doc(cfg(...))]`.
Expand Down Expand Up @@ -530,9 +530,9 @@ declare_features! (
/// Allows the `#[must_not_suspend]` attribute.
(unstable, must_not_suspend, "1.57.0", Some(83310)),
/// Make `mut` not reset the binding mode on edition >= 2024.
(incomplete, mut_preserve_binding_mode_2024, "CURRENT_RUSTC_VERSION", Some(123076)),
(incomplete, mut_preserve_binding_mode_2024, "1.79.0", Some(123076)),
/// Allows `mut ref` and `mut ref mut` identifier patterns.
(incomplete, mut_ref, "CURRENT_RUSTC_VERSION", Some(123076)),
(incomplete, mut_ref, "1.79.0", Some(123076)),
/// Allows using `#[naked]` on functions.
(unstable, naked_functions, "1.9.0", Some(90957)),
/// Allows specifying the as-needed link modifier
Expand Down Expand Up @@ -564,17 +564,17 @@ declare_features! (
/// Allows using `#[optimize(X)]`.
(unstable, optimize_attribute, "1.34.0", Some(54882)),
/// Allows postfix match `expr.match { ... }`
(unstable, postfix_match, "CURRENT_RUSTC_VERSION", Some(121618)),
(unstable, postfix_match, "1.79.0", Some(121618)),
/// Allows `use<'a, 'b, A, B>` in `impl use<...> Trait` for precise capture of generic args.
(incomplete, precise_capturing, "CURRENT_RUSTC_VERSION", Some(123432)),
(incomplete, precise_capturing, "1.79.0", Some(123432)),
/// Allows macro attributes on expressions, statements and non-inline modules.
(unstable, proc_macro_hygiene, "1.30.0", Some(54727)),
/// Allows `&raw const $place_expr` and `&raw mut $place_expr` expressions.
(unstable, raw_ref_op, "1.41.0", Some(64490)),
/// Makes `&` and `&mut` patterns eat only one layer of references in Rust 2024.
(incomplete, ref_pat_eat_one_layer_2024, "CURRENT_RUSTC_VERSION", Some(123076)),
(incomplete, ref_pat_eat_one_layer_2024, "1.79.0", Some(123076)),
/// Allows `&` and `&mut` patterns to consume match-ergonomics-inserted references.
(incomplete, ref_pat_everywhere, "CURRENT_RUSTC_VERSION", Some(123076)),
(incomplete, ref_pat_everywhere, "1.79.0", Some(123076)),
/// Allows using the `#[register_tool]` attribute.
(unstable, register_tool, "1.41.0", Some(66079)),
/// Allows the `#[repr(i128)]` attribute for enums.
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_infer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#![allow(internal_features)]
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
#![feature(box_patterns)]
#![feature(control_flow_enum)]
#![feature(extend_one)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_metadata/src/rmeta/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
sess: &'a Session,
) -> impl Iterator<Item = ModChild> + 'a {
iter::from_coroutine(
#[cfg_attr(not(bootstrap), coroutine)]
#[coroutine]
move || {
if let Some(data) = &self.root.proc_macro_data {
// If we are loading as a proc macro, we want to return
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_middle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#![feature(coroutines)]
#![feature(stmt_expr_attributes)]
#![feature(if_let_guard)]
#![cfg_attr(bootstrap, feature(inline_const))]
#![feature(iter_from_coroutine)]
#![feature(negative_impls)]
#![feature(never_type)]
Expand All @@ -48,7 +47,6 @@
#![feature(trusted_len)]
#![feature(type_alias_impl_trait)]
#![feature(strict_provenance)]
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
#![feature(rustc_attrs)]
#![feature(control_flow_enum)]
#![feature(trait_upcasting)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ pub fn analyze_coroutine_closure_captures<'a, 'tcx: 'a, T>(
mut for_each: impl FnMut((usize, &'a CapturedPlace<'tcx>), (usize, &'a CapturedPlace<'tcx>)) -> T,
) -> impl Iterator<Item = T> + Captures<'a> + Captures<'tcx> {
std::iter::from_coroutine(
#[cfg_attr(not(bootstrap), coroutine)]
#[coroutine]
move || {
let mut child_captures = child_captures.into_iter().enumerate().peekable();

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ impl<'tcx> TyCtxt<'tcx> {

let definitions = &self.untracked.definitions;
std::iter::from_coroutine(
#[cfg_attr(not(bootstrap), coroutine)]
#[coroutine]
|| {
let mut i = 0;

Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_mir_build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![feature(assert_matches)]
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
#![feature(box_patterns)]
#![feature(if_let_guard)]
#![feature(let_chains)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_mir_transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#![feature(cow_is_borrowed)]
#![feature(decl_macro)]
#![feature(impl_trait_in_assoc_type)]
#![cfg_attr(bootstrap, feature(inline_const))]
#![feature(is_sorted)]
#![feature(let_chains)]
#![feature(map_try_insert)]
Expand Down
2 changes: 0 additions & 2 deletions compiler/rustc_serialize/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
#![doc(rust_logo)]
#![allow(internal_features)]
#![feature(rustdoc_internals)]
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
#![feature(const_option)]
#![feature(core_intrinsics)]
#![cfg_attr(bootstrap, feature(inline_const))]
#![feature(min_specialization)]
#![feature(never_type)]
#![feature(ptr_sub_ptr)]
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_trait_selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#![allow(rustc::diagnostic_outside_of_impl)]
#![allow(rustc::untranslatable_diagnostic)]
#![feature(assert_matches)]
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
#![feature(associated_type_defaults)]
#![feature(box_patterns)]
#![feature(control_flow_enum)]
Expand Down
4 changes: 1 addition & 3 deletions library/alloc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,6 @@
//
// Language features:
// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
#![cfg_attr(bootstrap, feature(inline_const))]
#![cfg_attr(not(bootstrap), rustc_preserve_ub_checks)]
#![cfg_attr(not(test), feature(coroutine_trait))]
#![cfg_attr(test, feature(panic_update_hook))]
#![cfg_attr(test, feature(test))]
Expand Down Expand Up @@ -198,6 +195,7 @@
#![feature(unboxed_closures)]
#![feature(unsized_fn_params)]
#![feature(with_negative_coherence)]
#![rustc_preserve_ub_checks]
// tidy-alphabetical-end
//
// Rustdoc features:
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/src/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub use core::str::{RSplit, Split};
pub use core::str::{RSplitN, SplitN};
#[stable(feature = "rust1", since = "1.0.0")]
pub use core::str::{RSplitTerminator, SplitTerminator};
#[stable(feature = "utf8_chunks", since = "CURRENT_RUSTC_VERSION")]
#[stable(feature = "utf8_chunks", since = "1.79.0")]
pub use core::str::{Utf8Chunk, Utf8Chunks};

/// Note: `str` in `Concat<str>` is not meaningful here.
Expand Down
1 change: 0 additions & 1 deletion library/alloc/tests/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
#![feature(allocator_api)]
#![feature(alloc_layout_extra)]
#![feature(iter_array_chunks)]
Expand Down