Skip to content

Commit a128516

Browse files
committed
Auto merge of #122754 - Mark-Simulacrum:bootstrap-bump, r=albertlarsan68
Bump to 1.78 bootstrap compiler https://forge.rust-lang.org/release/process.html#master-bootstrap-update-t-2-day-tuesday
2 parents c86f3ac + 9a22a0f commit a128516

File tree

45 files changed

+487
-633
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+487
-633
lines changed

compiler/rustc_ast/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#![feature(box_patterns)]
1717
#![feature(if_let_guard)]
1818
#![feature(let_chains)]
19-
#![cfg_attr(bootstrap, feature(min_specialization))]
2019
#![feature(never_type)]
2120
#![feature(negative_impls)]
2221
#![feature(stmt_expr_attributes)]

compiler/rustc_data_structures/src/sync/lock.rs

+1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ mod no_sync {
189189
use super::Mode;
190190
use std::cell::RefCell;
191191

192+
#[doc(no_inline)]
192193
pub use std::cell::RefMut as LockGuard;
193194

194195
pub struct Lock<T>(RefCell<T>);

compiler/rustc_errors/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#![allow(internal_features)]
88
#![allow(rustc::diagnostic_outside_of_impl)]
99
#![allow(rustc::untranslatable_diagnostic)]
10-
#![cfg_attr(bootstrap, feature(min_specialization))]
1110
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1211
#![doc(rust_logo)]
1312
#![feature(array_windows)]

compiler/rustc_feature/src/accepted.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ declare_features! (
8787
/// Enables `#[cfg(panic = "...")]` config key.
8888
(accepted, cfg_panic, "1.60.0", Some(77443)),
8989
/// Allows `cfg(target_abi = "...")`.
90-
(accepted, cfg_target_abi, "CURRENT_RUSTC_VERSION", Some(80970)),
90+
(accepted, cfg_target_abi, "1.78.0", Some(80970)),
9191
/// Allows `cfg(target_feature = "...")`.
9292
(accepted, cfg_target_feature, "1.27.0", Some(29717)),
9393
/// Allows `cfg(target_vendor = "...")`.
@@ -149,7 +149,7 @@ declare_features! (
149149
/// Allows the use of destructuring assignments.
150150
(accepted, destructuring_assignment, "1.59.0", Some(71126)),
151151
/// Allows using the `#[diagnostic]` attribute tool namespace
152-
(accepted, diagnostic_namespace, "CURRENT_RUSTC_VERSION", Some(111996)),
152+
(accepted, diagnostic_namespace, "1.78.0", Some(111996)),
153153
/// Allows `#[doc(alias = "...")]`.
154154
(accepted, doc_alias, "1.48.0", Some(50146)),
155155
/// Allows `..` in tuple (struct) patterns.

compiler/rustc_feature/src/removed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ declare_features! (
9898
(removed, external_doc, "1.54.0", Some(44732),
9999
Some("use #[doc = include_str!(\"filename\")] instead, which handles macro invocations")),
100100
/// Allows using `#[ffi_returns_twice]` on foreign functions.
101-
(removed, ffi_returns_twice, "CURRENT_RUSTC_VERSION", Some(58314),
101+
(removed, ffi_returns_twice, "1.78.0", Some(58314),
102102
Some("being investigated by the ffi-unwind project group")),
103103
/// Allows generators to be cloned.
104104
(removed, generator_clone, "1.65.0", Some(95360), Some("renamed to `coroutine_clone`")),

compiler/rustc_feature/src/unstable.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ declare_features! (
214214
/// Allows using `#[omit_gdb_pretty_printer_section]`.
215215
(internal, omit_gdb_pretty_printer_section, "1.5.0", None),
216216
/// Set the maximum pattern complexity allowed (not limited by default).
217-
(internal, pattern_complexity, "CURRENT_RUSTC_VERSION", None),
217+
(internal, pattern_complexity, "1.78.0", None),
218218
/// Allows using `#[prelude_import]` on glob `use` items.
219219
(internal, prelude_import, "1.2.0", None),
220220
/// Used to identify crates that contain the profiler runtime.
@@ -301,11 +301,11 @@ declare_features! (
301301
(unstable, csky_target_feature, "1.73.0", Some(44839)),
302302
(unstable, ermsb_target_feature, "1.49.0", Some(44839)),
303303
(unstable, hexagon_target_feature, "1.27.0", Some(44839)),
304-
(unstable, lahfsahf_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
304+
(unstable, lahfsahf_target_feature, "1.78.0", Some(44839)),
305305
(unstable, loongarch_target_feature, "1.73.0", Some(44839)),
306306
(unstable, mips_target_feature, "1.27.0", Some(44839)),
307307
(unstable, powerpc_target_feature, "1.27.0", Some(44839)),
308-
(unstable, prfchw_target_feature, "CURRENT_RUSTC_VERSION", Some(44839)),
308+
(unstable, prfchw_target_feature, "1.78.0", Some(44839)),
309309
(unstable, riscv_target_feature, "1.45.0", Some(44839)),
310310
(unstable, rtm_target_feature, "1.35.0", Some(44839)),
311311
(unstable, sse4a_target_feature, "1.27.0", Some(44839)),
@@ -346,7 +346,7 @@ declare_features! (
346346
/// Enables experimental inline assembly support for additional architectures.
347347
(unstable, asm_experimental_arch, "1.58.0", Some(93335)),
348348
/// Allows using `label` operands in inline assembly.
349-
(unstable, asm_goto, "CURRENT_RUSTC_VERSION", Some(119364)),
349+
(unstable, asm_goto, "1.78.0", Some(119364)),
350350
/// Allows the `may_unwind` option in inline assembly.
351351
(unstable, asm_unwind, "1.58.0", Some(93334)),
352352
/// Allows users to enforce equality of associated constants `TraitImpl<AssocConst=3>`.
@@ -410,7 +410,7 @@ declare_features! (
410410
/// Allows references to types with interior mutability within constants
411411
(unstable, const_refs_to_cell, "1.51.0", Some(80384)),
412412
/// Allows creating pointers and references to `static` items in constants.
413-
(unstable, const_refs_to_static, "CURRENT_RUSTC_VERSION", Some(119618)),
413+
(unstable, const_refs_to_static, "1.78.0", Some(119618)),
414414
/// Allows `impl const Trait for T` syntax.
415415
(unstable, const_trait_impl, "1.42.0", Some(67792)),
416416
/// Allows the `?` operator in const contexts.
@@ -462,9 +462,9 @@ declare_features! (
462462
/// Allows defining `extern type`s.
463463
(unstable, extern_types, "1.23.0", Some(43467)),
464464
/// Allow using 128-bit (quad precision) floating point numbers.
465-
(unstable, f128, "CURRENT_RUSTC_VERSION", Some(116909)),
465+
(unstable, f128, "1.78.0", Some(116909)),
466466
/// Allow using 16-bit (half precision) floating point numbers.
467-
(unstable, f16, "CURRENT_RUSTC_VERSION", Some(116909)),
467+
(unstable, f16, "1.78.0", Some(116909)),
468468
/// Allows the use of `#[ffi_const]` on foreign functions.
469469
(unstable, ffi_const, "1.45.0", Some(58328)),
470470
/// Allows the use of `#[ffi_pure]` on foreign functions.
@@ -474,7 +474,7 @@ declare_features! (
474474
/// Support delegating implementation of functions to other already implemented functions.
475475
(incomplete, fn_delegation, "1.76.0", Some(118212)),
476476
/// Allows impls for the Freeze trait.
477-
(internal, freeze_impls, "CURRENT_RUSTC_VERSION", Some(121675)),
477+
(internal, freeze_impls, "1.78.0", Some(121675)),
478478
/// Allows defining gen blocks and `gen fn`.
479479
(unstable, gen_blocks, "1.75.0", Some(117078)),
480480
/// Infer generic args for both consts and types.

compiler/rustc_hir/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![feature(associated_type_defaults)]
66
#![feature(closure_track_caller)]
77
#![feature(let_chains)]
8-
#![cfg_attr(bootstrap, feature(min_specialization))]
98
#![feature(never_type)]
109
#![feature(rustc_attrs)]
1110
#![feature(variant_count)]

compiler/rustc_hir_analysis/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ This API is completely unstable and subject to change.
6868
#![feature(is_sorted)]
6969
#![feature(iter_intersperse)]
7070
#![feature(let_chains)]
71-
#![cfg_attr(bootstrap, feature(min_specialization))]
7271
#![feature(never_type)]
7372
#![feature(lazy_cell)]
7473
#![feature(slice_partition_dedup)]

compiler/rustc_hir_typeck/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![feature(try_blocks)]
66
#![feature(never_type)]
77
#![feature(box_patterns)]
8-
#![cfg_attr(bootstrap, feature(min_specialization))]
98
#![feature(control_flow_enum)]
109

1110
#[macro_use]

compiler/rustc_infer/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#![feature(let_chains)]
2626
#![feature(if_let_guard)]
2727
#![feature(iterator_try_collect)]
28-
#![cfg_attr(bootstrap, feature(min_specialization))]
2928
#![feature(try_blocks)]
3029
#![feature(yeet_expr)]
3130
#![recursion_limit = "512"] // For rustdoc

compiler/rustc_middle/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
2525
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
2626
#![doc(rust_logo)]
27-
#![cfg_attr(bootstrap, feature(exhaustive_patterns))]
28-
#![cfg_attr(not(bootstrap), feature(min_exhaustive_patterns))]
27+
#![feature(min_exhaustive_patterns)]
2928
#![feature(rustdoc_internals)]
3029
#![feature(allocator_api)]
3130
#![feature(array_windows)]

compiler/rustc_mir_build/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#![feature(box_patterns)]
1010
#![feature(if_let_guard)]
1111
#![feature(let_chains)]
12-
#![cfg_attr(bootstrap, feature(min_specialization))]
1312
#![feature(try_blocks)]
1413

1514
#[macro_use]

compiler/rustc_mir_dataflow/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![feature(box_patterns)]
33
#![feature(exact_size_is_empty)]
44
#![feature(let_chains)]
5-
#![cfg_attr(bootstrap, feature(min_specialization))]
65
#![feature(try_blocks)]
76

87
#[macro_use]

compiler/rustc_mir_transform/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#![feature(is_sorted)]
99
#![feature(let_chains)]
1010
#![feature(map_try_insert)]
11-
#![cfg_attr(bootstrap, feature(min_specialization))]
1211
#![feature(never_type)]
1312
#![feature(option_get_or_insert_default)]
1413
#![feature(round_char_boundary)]

compiler/rustc_target/src/lib.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@
99
1010
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1111
#![doc(rust_logo)]
12-
#![cfg_attr(bootstrap, feature(exhaustive_patterns))]
13-
#![cfg_attr(not(bootstrap), feature(min_exhaustive_patterns))]
12+
#![feature(min_exhaustive_patterns)]
1413
#![feature(rustdoc_internals)]
1514
#![feature(assert_matches)]
1615
#![feature(iter_intersperse)]
1716
#![feature(let_chains)]
18-
#![cfg_attr(bootstrap, feature(min_specialization))]
1917
#![feature(rustc_attrs)]
2018
#![feature(step_trait)]
2119
#![allow(internal_features)]

compiler/rustc_trait_selection/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#![feature(option_take_if)]
2727
#![feature(never_type)]
2828
#![feature(type_alias_impl_trait)]
29-
#![cfg_attr(bootstrap, feature(min_specialization))]
3029
#![recursion_limit = "512"] // For rustdoc
3130

3231
#[macro_use]

library/alloc/src/alloc.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extern "Rust" {
5151
#[derive(Copy, Clone, Default, Debug)]
5252
#[cfg(not(test))]
5353
// the compiler needs to know when a Box uses the global allocator vs a custom one
54-
#[cfg_attr(not(bootstrap), lang = "global_alloc_ty")]
54+
#[lang = "global_alloc_ty"]
5555
pub struct Global;
5656

5757
#[cfg(test)]
@@ -387,8 +387,7 @@ pub const fn handle_alloc_error(layout: Layout) -> ! {
387387
}
388388

389389
#[cfg(not(feature = "panic_immediate_abort"))]
390-
#[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block
391-
unsafe {
390+
{
392391
core::intrinsics::const_eval_select((layout,), ct_error, rt_error)
393392
}
394393

library/core/src/convert/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ pub trait AsMut<T: ?Sized> {
396396
/// For example, take this code:
397397
///
398398
/// ```
399-
/// # #![cfg_attr(not(bootstrap), allow(non_local_definitions))]
399+
/// # #![allow(non_local_definitions)]
400400
/// struct Wrapper<T>(Vec<T>);
401401
/// impl<T> From<Wrapper<T>> for Vec<T> {
402402
/// fn from(w: Wrapper<T>) -> Vec<T> {

library/core/src/ffi/c_str.rs

+2-12
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,7 @@ impl CStr {
438438
unsafe { &*(bytes as *const [u8] as *const CStr) }
439439
}
440440

441-
#[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block
442-
// SAFETY: The const and runtime versions have identical behavior
443-
// unless the safety contract of `from_bytes_with_nul_unchecked` is
444-
// violated, which is UB.
445-
unsafe {
446-
intrinsics::const_eval_select((bytes,), const_impl, rt_impl)
447-
}
441+
intrinsics::const_eval_select((bytes,), const_impl, rt_impl)
448442
}
449443

450444
/// Returns the inner pointer to this C string.
@@ -759,11 +753,7 @@ const unsafe fn const_strlen(ptr: *const c_char) -> usize {
759753
unsafe { strlen(s) }
760754
}
761755

762-
#[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block
763-
// SAFETY: the two functions always provide equivalent functionality
764-
unsafe {
765-
intrinsics::const_eval_select((ptr,), strlen_ct, strlen_rt)
766-
}
756+
intrinsics::const_eval_select((ptr,), strlen_ct, strlen_rt)
767757
}
768758

769759
/// An iterator over the bytes of a [`CStr`], without the nul terminator.

library/core/src/hash/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ pub trait Hasher {
454454
/// ```
455455
/// #![feature(hasher_prefixfree_extras)]
456456
/// # // Stubs to make the `impl` below pass the compiler
457-
/// # #![cfg_attr(not(bootstrap), allow(non_local_definitions))]
457+
/// # #![allow(non_local_definitions)]
458458
/// # struct MyCollection<T>(Option<T>);
459459
/// # impl<T> MyCollection<T> {
460460
/// # fn len(&self) -> usize { todo!() }

0 commit comments

Comments
 (0)