Skip to content

Commit aa25c13

Browse files
committed
2 parents a5ee5cb + bdc9064 commit aa25c13

File tree

51 files changed

+513
-637
lines changed

Some content is hidden

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

51 files changed

+513
-637
lines changed

compiler/rustc_builtin_macros/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![allow(internal_features)]
66
#![allow(rustc::diagnostic_outside_of_impl)]
77
#![allow(rustc::untranslatable_diagnostic)]
8-
#![cfg_attr(bootstrap, feature(lint_reasons))]
98
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
109
#![doc(rust_logo)]
1110
#![feature(assert_matches)]

compiler/rustc_const_eval/src/check_consts/check.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -634,10 +634,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
634634
trace!(
635635
"visit_projection_elem: place_ref={:?} elem={:?} \
636636
context={:?} location={:?}",
637-
place_ref,
638-
elem,
639-
context,
640-
location,
637+
place_ref, elem, context, location,
641638
);
642639

643640
self.super_projection_elem(place_ref, elem, context, location);

compiler/rustc_const_eval/src/interpret/operator.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
329329
) -> InterpResult<'tcx, ImmTy<'tcx, M::Provenance>> {
330330
trace!(
331331
"Running binary op {:?}: {:?} ({}), {:?} ({})",
332-
bin_op,
333-
*left,
334-
left.layout.ty,
335-
*right,
336-
right.layout.ty
332+
bin_op, *left, left.layout.ty, *right, right.layout.ty
337333
);
338334

339335
match left.layout.ty.kind() {

compiler/rustc_const_eval/src/interpret/terminator.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
431431
} else {
432432
trace!(
433433
"check_argument_compat: incompatible ABIs:\ncaller: {:?}\ncallee: {:?}",
434-
caller_abi,
435-
callee_abi
434+
caller_abi, callee_abi
436435
);
437436
return Ok(false);
438437
}

compiler/rustc_data_structures/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#![allow(internal_features)]
1111
#![allow(rustc::default_hash_types)]
1212
#![allow(rustc::potential_query_instability)]
13-
#![cfg_attr(bootstrap, feature(lint_reasons))]
1413
#![cfg_attr(not(parallel_compiler), feature(cell_leak))]
1514
#![deny(unsafe_op_in_unsafe_fn)]
1615
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]

compiler/rustc_feature/src/accepted.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ declare_features! (
8686
/// Allows `c"foo"` literals.
8787
(accepted, c_str_literals, "1.77.0", Some(105723)),
8888
/// Allows `extern "C-unwind" fn` to enable unwinding across ABI boundaries and treat `extern "C" fn` as nounwind.
89-
(accepted, c_unwind, "CURRENT_RUSTC_VERSION", Some(74990)),
89+
(accepted, c_unwind, "1.81.0", Some(74990)),
9090
/// Allows `#[cfg_attr(predicate, multiple, attributes, here)]`.
9191
(accepted, cfg_attr_multi, "1.33.0", Some(54881)),
9292
/// Allows the use of `#[cfg(doctest)]`, set when rustdoc is collecting doctests.
@@ -238,7 +238,7 @@ declare_features! (
238238
/// Allows `let...else` statements.
239239
(accepted, let_else, "1.65.0", Some(87335)),
240240
/// Allows using `reason` in lint attributes and the `#[expect(lint)]` lint check.
241-
(accepted, lint_reasons, "CURRENT_RUSTC_VERSION", Some(54503)),
241+
(accepted, lint_reasons, "1.81.0", Some(54503)),
242242
/// Allows `break {expr}` with a value inside `loop`s.
243243
(accepted, loop_break_value, "1.19.0", Some(37339)),
244244
/// Allows use of `?` as the Kleene "at most one" operator in macros.

compiler/rustc_feature/src/removed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ declare_features! (
223223
(removed, unwind_attributes, "1.56.0", Some(58760), Some("use the C-unwind ABI instead")),
224224
(removed, visible_private_types, "1.0.0", None, None),
225225
/// Allows `extern "wasm" fn`
226-
(removed, wasm_abi, "CURRENT_RUSTC_VERSION", Some(83788),
226+
(removed, wasm_abi, "1.81.0", Some(83788),
227227
Some("non-standard wasm ABI is no longer supported")),
228228
// !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!
229229
// Features are listed in alphabetical order. Tidy will fail if you don't keep it this way.

compiler/rustc_feature/src/unstable.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ declare_features! (
518518
/// Give access to additional metadata about declarative macro meta-variables.
519519
(unstable, macro_metavar_expr, "1.61.0", Some(83527)),
520520
/// Provides a way to concatenate identifiers using metavariable expressions.
521-
(unstable, macro_metavar_expr_concat, "CURRENT_RUSTC_VERSION", Some(124225)),
521+
(unstable, macro_metavar_expr_concat, "1.81.0", Some(124225)),
522522
/// Allows `#[marker]` on certain traits allowing overlapping implementations.
523523
(unstable, marker_trait_attr, "1.30.0", Some(29864)),
524524
/// Allows exhaustive pattern matching on types that contain uninhabited types in cases that are
@@ -563,11 +563,11 @@ declare_features! (
563563
/// Allows using multiple nested field accesses in offset_of!
564564
(unstable, offset_of_nested, "1.77.0", Some(120140)),
565565
/// Allows using fields with slice type in offset_of!
566-
(unstable, offset_of_slice, "CURRENT_RUSTC_VERSION", Some(126151)),
566+
(unstable, offset_of_slice, "1.81.0", Some(126151)),
567567
/// Allows using `#[optimize(X)]`.
568568
(unstable, optimize_attribute, "1.34.0", Some(54882)),
569569
/// Allows specifying nop padding on functions for dynamic patching.
570-
(unstable, patchable_function_entry, "CURRENT_RUSTC_VERSION", Some(123115)),
570+
(unstable, patchable_function_entry, "1.81.0", Some(123115)),
571571
/// Allows postfix match `expr.match { ... }`
572572
(unstable, postfix_match, "1.79.0", Some(121618)),
573573
/// Allows `use<'a, 'b, A, B>` in `impl Trait + use<...>` for precise capture of generic args.
@@ -579,7 +579,7 @@ declare_features! (
579579
/// Makes `&` and `&mut` patterns eat only one layer of references in Rust 2024.
580580
(incomplete, ref_pat_eat_one_layer_2024, "1.79.0", Some(123076)),
581581
/// Makes `&` and `&mut` patterns eat only one layer of references in Rust 2024—structural variant
582-
(incomplete, ref_pat_eat_one_layer_2024_structural, "CURRENT_RUSTC_VERSION", Some(123076)),
582+
(incomplete, ref_pat_eat_one_layer_2024_structural, "1.81.0", Some(123076)),
583583
/// Allows using the `#[register_tool]` attribute.
584584
(unstable, register_tool, "1.41.0", Some(66079)),
585585
/// Allows the `#[repr(i128)]` attribute for enums.
@@ -645,9 +645,9 @@ declare_features! (
645645
/// Allows using the `#[used(linker)]` (or `#[used(compiler)]`) attribute.
646646
(unstable, used_with_arg, "1.60.0", Some(93798)),
647647
/// Allows use of x86 `AMX` target-feature attributes and intrinsics
648-
(unstable, x86_amx_intrinsics, "CURRENT_RUSTC_VERSION", Some(126622)),
648+
(unstable, x86_amx_intrinsics, "1.81.0", Some(126622)),
649649
/// Allows use of the `xop` target-feature
650-
(unstable, xop_target_feature, "CURRENT_RUSTC_VERSION", Some(127208)),
650+
(unstable, xop_target_feature, "1.81.0", Some(127208)),
651651
/// Allows `do yeet` expressions
652652
(unstable, yeet_expr, "1.62.0", Some(96373)),
653653
// !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!! !!!!

compiler/rustc_lint_defs/src/builtin.rs

-2
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,6 @@ declare_lint! {
617617
/// ### Example
618618
///
619619
/// ```rust
620-
/// #![cfg_attr(bootstrap, feature(lint_reasons))]
621-
///
622620
/// #[expect(unused_variables)]
623621
/// let x = 10;
624622
/// println!("{}", x);

compiler/rustc_parse/src/errors.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -555,12 +555,7 @@ pub(crate) enum MissingInInForLoopSub {
555555
code = "in"
556556
)]
557557
InNotOf(#[primary_span] Span),
558-
#[suggestion(
559-
parse_add_in,
560-
style = "verbose",
561-
applicability = "maybe-incorrect",
562-
code = " in "
563-
)]
558+
#[suggestion(parse_add_in, style = "verbose", applicability = "maybe-incorrect", code = " in ")]
564559
AddIn(#[primary_span] Span),
565560
}
566561

compiler/rustc_trait_selection/src/errors.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1582,10 +1582,7 @@ pub enum TypeErrorAdditionalDiags {
15821582
span: Span,
15831583
code: String,
15841584
},
1585-
#[multipart_suggestion(
1586-
trait_selection_meant_str_literal,
1587-
applicability = "machine-applicable"
1588-
)]
1585+
#[multipart_suggestion(trait_selection_meant_str_literal, applicability = "machine-applicable")]
15891586
MeantStrLiteral {
15901587
#[suggestion_part(code = "\"")]
15911588
start: Span,

compiler/rustc_ty_utils/src/layout.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -733,9 +733,7 @@ fn coroutine_saved_local_eligibility(
733733
// point, so it is no longer a candidate.
734734
trace!(
735735
"removing local {:?} in >1 variant ({:?}, {:?})",
736-
local,
737-
variant_index,
738-
idx
736+
local, variant_index, idx
739737
);
740738
ineligible_locals.insert(*local);
741739
assignments[*local] = Ineligible(None);

library/alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@
164164
//
165165
// Language features:
166166
// tidy-alphabetical-start
167-
#![cfg_attr(bootstrap, feature(c_unwind))]
168167
#![cfg_attr(not(test), feature(coroutine_trait))]
169168
#![cfg_attr(test, feature(panic_update_hook))]
170169
#![cfg_attr(test, feature(test))]

library/core/src/char/methods.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,7 @@ impl char {
222222
/// assert_eq!('❤', c);
223223
/// ```
224224
#[stable(feature = "assoc_char_funcs", since = "1.52.0")]
225-
#[rustc_const_stable(
226-
feature = "const_char_from_u32_unchecked",
227-
since = "CURRENT_RUSTC_VERSION"
228-
)]
225+
#[rustc_const_stable(feature = "const_char_from_u32_unchecked", since = "1.81.0")]
229226
#[must_use]
230227
#[inline]
231228
pub const unsafe fn from_u32_unchecked(i: u32) -> char {

library/core/src/char/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub const fn from_u32(i: u32) -> Option<char> {
125125
/// Converts a `u32` to a `char`, ignoring validity. Use [`char::from_u32_unchecked`].
126126
/// instead.
127127
#[stable(feature = "char_from_unchecked", since = "1.5.0")]
128-
#[rustc_const_stable(feature = "const_char_from_u32_unchecked", since = "CURRENT_RUSTC_VERSION")]
128+
#[rustc_const_stable(feature = "const_char_from_u32_unchecked", since = "1.81.0")]
129129
#[must_use]
130130
#[inline]
131131
pub const unsafe fn from_u32_unchecked(i: u32) -> char {

library/core/src/error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![doc = include_str!("error.md")]
2-
#![stable(feature = "error_in_core", since = "CURRENT_RUSTC_VERSION")]
2+
#![stable(feature = "error_in_core", since = "1.81.0")]
33

44
#[cfg(test)]
55
mod tests;

library/core/src/ffi/c_str.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ impl CStr {
272272
#[inline] // inline is necessary for codegen to see strlen.
273273
#[must_use]
274274
#[stable(feature = "rust1", since = "1.0.0")]
275-
#[rustc_const_stable(feature = "const_cstr_from_ptr", since = "CURRENT_RUSTC_VERSION")]
275+
#[rustc_const_stable(feature = "const_cstr_from_ptr", since = "1.81.0")]
276276
pub const unsafe fn from_ptr<'a>(ptr: *const c_char) -> &'a CStr {
277277
// SAFETY: The caller has provided a pointer that points to a valid C
278278
// string with a NUL terminator less than `isize::MAX` from `ptr`.
@@ -534,7 +534,7 @@ impl CStr {
534534
#[must_use]
535535
#[doc(alias("len", "strlen"))]
536536
#[stable(feature = "cstr_count_bytes", since = "1.79.0")]
537-
#[rustc_const_stable(feature = "const_cstr_from_ptr", since = "CURRENT_RUSTC_VERSION")]
537+
#[rustc_const_stable(feature = "const_cstr_from_ptr", since = "1.81.0")]
538538
pub const fn count_bytes(&self) -> usize {
539539
self.inner.len() - 1
540540
}
@@ -729,7 +729,7 @@ impl AsRef<CStr> for CStr {
729729
/// located within `isize::MAX` from `ptr`.
730730
#[inline]
731731
#[unstable(feature = "cstr_internals", issue = "none")]
732-
#[rustc_const_stable(feature = "const_cstr_from_ptr", since = "CURRENT_RUSTC_VERSION")]
732+
#[rustc_const_stable(feature = "const_cstr_from_ptr", since = "1.81.0")]
733733
#[rustc_allow_const_fn_unstable(const_eval_select)]
734734
const unsafe fn strlen(ptr: *const c_char) -> usize {
735735
const fn strlen_ct(s: *const c_char) -> usize {

library/core/src/hint.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ pub const unsafe fn unreachable_unchecked() -> ! {
194194
#[track_caller]
195195
#[inline(always)]
196196
#[doc(alias = "assume")]
197-
#[stable(feature = "hint_assert_unchecked", since = "CURRENT_RUSTC_VERSION")]
198-
#[rustc_const_stable(feature = "hint_assert_unchecked", since = "CURRENT_RUSTC_VERSION")]
197+
#[stable(feature = "hint_assert_unchecked", since = "1.81.0")]
198+
#[rustc_const_stable(feature = "hint_assert_unchecked", since = "1.81.0")]
199199
pub const unsafe fn assert_unchecked(cond: bool) {
200200
// SAFETY: The caller promised `cond` is true.
201201
unsafe {

library/core/src/intrinsics.rs

-53
Original file line numberDiff line numberDiff line change
@@ -1015,45 +1015,6 @@ extern "rust-intrinsic" {
10151015
#[rustc_nounwind]
10161016
pub fn breakpoint();
10171017

1018-
#[cfg(bootstrap)]
1019-
#[rustc_const_stable(feature = "const_size_of", since = "1.40.0")]
1020-
#[rustc_safe_intrinsic]
1021-
#[rustc_nounwind]
1022-
pub fn size_of<T>() -> usize;
1023-
1024-
#[cfg(bootstrap)]
1025-
#[rustc_const_stable(feature = "const_min_align_of", since = "1.40.0")]
1026-
#[rustc_safe_intrinsic]
1027-
#[rustc_nounwind]
1028-
pub fn min_align_of<T>() -> usize;
1029-
1030-
#[cfg(bootstrap)]
1031-
#[rustc_const_unstable(feature = "const_pref_align_of", issue = "91971")]
1032-
#[rustc_nounwind]
1033-
pub fn pref_align_of<T>() -> usize;
1034-
1035-
#[cfg(bootstrap)]
1036-
#[rustc_const_unstable(feature = "const_size_of_val", issue = "46571")]
1037-
#[rustc_nounwind]
1038-
pub fn size_of_val<T: ?Sized>(_: *const T) -> usize;
1039-
1040-
#[cfg(bootstrap)]
1041-
#[rustc_const_unstable(feature = "const_align_of_val", issue = "46571")]
1042-
#[rustc_nounwind]
1043-
pub fn min_align_of_val<T: ?Sized>(_: *const T) -> usize;
1044-
1045-
#[cfg(bootstrap)]
1046-
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
1047-
#[rustc_safe_intrinsic]
1048-
#[rustc_nounwind]
1049-
pub fn type_name<T: ?Sized>() -> &'static str;
1050-
1051-
#[cfg(bootstrap)]
1052-
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]
1053-
#[rustc_safe_intrinsic]
1054-
#[rustc_nounwind]
1055-
pub fn type_id<T: ?Sized + 'static>() -> u128;
1056-
10571018
/// A guard for unsafe functions that cannot ever be executed if `T` is uninhabited:
10581019
/// This will statically either panic, or do nothing.
10591020
///
@@ -2383,12 +2344,6 @@ extern "rust-intrinsic" {
23832344
#[rustc_nounwind]
23842345
pub fn discriminant_value<T>(v: &T) -> <T as DiscriminantKind>::Discriminant;
23852346

2386-
#[cfg(bootstrap)]
2387-
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
2388-
#[rustc_safe_intrinsic]
2389-
#[rustc_nounwind]
2390-
pub fn variant_count<T>() -> usize;
2391-
23922347
/// Rust's "try catch" construct for unwinding. Invokes the function pointer `try_fn` with the
23932348
/// data pointer `data`, and calls `catch_fn` if unwinding occurs while `try_fn` runs.
23942349
///
@@ -2766,7 +2721,6 @@ pub unsafe fn vtable_align(_ptr: *const ()) -> usize {
27662721
#[rustc_const_stable(feature = "const_size_of", since = "1.40.0")]
27672722
#[rustc_intrinsic]
27682723
#[rustc_intrinsic_must_be_overridden]
2769-
#[cfg(not(bootstrap))]
27702724
pub const fn size_of<T>() -> usize {
27712725
unreachable!()
27722726
}
@@ -2784,7 +2738,6 @@ pub const fn size_of<T>() -> usize {
27842738
#[rustc_const_stable(feature = "const_min_align_of", since = "1.40.0")]
27852739
#[rustc_intrinsic]
27862740
#[rustc_intrinsic_must_be_overridden]
2787-
#[cfg(not(bootstrap))]
27882741
pub const fn min_align_of<T>() -> usize {
27892742
unreachable!()
27902743
}
@@ -2798,7 +2751,6 @@ pub const fn min_align_of<T>() -> usize {
27982751
#[rustc_const_unstable(feature = "const_pref_align_of", issue = "91971")]
27992752
#[rustc_intrinsic]
28002753
#[rustc_intrinsic_must_be_overridden]
2801-
#[cfg(not(bootstrap))]
28022754
pub const unsafe fn pref_align_of<T>() -> usize {
28032755
unreachable!()
28042756
}
@@ -2817,7 +2769,6 @@ pub const unsafe fn pref_align_of<T>() -> usize {
28172769
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
28182770
#[rustc_intrinsic]
28192771
#[rustc_intrinsic_must_be_overridden]
2820-
#[cfg(not(bootstrap))]
28212772
pub const fn variant_count<T>() -> usize {
28222773
unreachable!()
28232774
}
@@ -2834,7 +2785,6 @@ pub const fn variant_count<T>() -> usize {
28342785
#[rustc_const_unstable(feature = "const_size_of_val", issue = "46571")]
28352786
#[rustc_intrinsic]
28362787
#[rustc_intrinsic_must_be_overridden]
2837-
#[cfg(not(bootstrap))]
28382788
pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
28392789
unreachable!()
28402790
}
@@ -2851,7 +2801,6 @@ pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
28512801
#[rustc_const_unstable(feature = "const_align_of_val", issue = "46571")]
28522802
#[rustc_intrinsic]
28532803
#[rustc_intrinsic_must_be_overridden]
2854-
#[cfg(not(bootstrap))]
28552804
pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
28562805
unreachable!()
28572806
}
@@ -2869,7 +2818,6 @@ pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
28692818
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
28702819
#[rustc_intrinsic]
28712820
#[rustc_intrinsic_must_be_overridden]
2872-
#[cfg(not(bootstrap))]
28732821
pub const fn type_name<T: ?Sized>() -> &'static str {
28742822
unreachable!()
28752823
}
@@ -2889,7 +2837,6 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
28892837
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]
28902838
#[rustc_intrinsic]
28912839
#[rustc_intrinsic_must_be_overridden]
2892-
#[cfg(not(bootstrap))]
28932840
pub const fn type_id<T: ?Sized + 'static>() -> u128 {
28942841
unreachable!()
28952842
}

library/core/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,6 @@
191191
//
192192
// Language features:
193193
// tidy-alphabetical-start
194-
#![cfg_attr(bootstrap, feature(c_unwind))]
195-
#![cfg_attr(bootstrap, feature(effects))]
196194
#![feature(abi_unadjusted)]
197195
#![feature(adt_const_params)]
198196
#![feature(allow_internal_unsafe)]

library/core/src/marker.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,6 @@ pub trait FnPtr: Copy + Clone {
10601060
}
10611061

10621062
/// Derive macro generating impls of traits related to smart pointers.
1063-
#[cfg(not(bootstrap))]
10641063
#[rustc_builtin_macro]
10651064
#[allow_internal_unstable(dispatch_from_dyn, coerce_unsized, unsize)]
10661065
#[unstable(feature = "derive_smart_pointer", issue = "123430")]
@@ -1078,7 +1077,6 @@ pub macro SmartPointer($item:item) {
10781077
reason = "internal module for implementing effects"
10791078
)]
10801079
#[allow(missing_debug_implementations)] // these unit structs don't need `Debug` impls.
1081-
#[cfg(not(bootstrap))]
10821080
pub mod effects {
10831081
#[lang = "EffectsNoRuntime"]
10841082
pub struct NoRuntime;

0 commit comments

Comments
 (0)