Skip to content

Commit 6e32cb0

Browse files
step cfg(bootstrap)
1 parent 9545bd3 commit 6e32cb0

File tree

32 files changed

+10
-148
lines changed

32 files changed

+10
-148
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
@@ -635,10 +635,7 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
635635
trace!(
636636
"visit_projection_elem: place_ref={:?} elem={:?} \
637637
context={:?} location={:?}",
638-
place_ref,
639-
elem,
640-
context,
641-
location,
638+
place_ref, elem, context, location,
642639
);
643640

644641
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
@@ -331,11 +331,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
331331
) -> InterpResult<'tcx, ImmTy<'tcx, M::Provenance>> {
332332
trace!(
333333
"Running binary op {:?}: {:?} ({}), {:?} ({})",
334-
bin_op,
335-
*left,
336-
left.layout.ty,
337-
*right,
338-
right.layout.ty
334+
bin_op, *left, left.layout.ty, *right, right.layout.ty
339335
);
340336

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

compiler/rustc_const_eval/src/interpret/terminator.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
440440
} else {
441441
trace!(
442442
"check_argument_compat: incompatible ABIs:\ncaller: {:?}\ncallee: {:?}",
443-
caller_abi,
444-
callee_abi
443+
caller_abi, callee_abi
445444
);
446445
return Ok(false);
447446
}

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_lint_defs/src/builtin.rs

-2
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,6 @@ declare_lint! {
615615
/// ### Example
616616
///
617617
/// ```rust
618-
/// #![cfg_attr(bootstrap, feature(lint_reasons))]
619-
///
620618
/// #[expect(unused_variables)]
621619
/// let x = 10;
622620
/// println!("{}", x);

compiler/rustc_parse/src/errors.rs

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

compiler/rustc_trait_selection/src/errors.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1585,10 +1585,7 @@ pub enum TypeErrorAdditionalDiags {
15851585
span: Span,
15861586
code: String,
15871587
},
1588-
#[multipart_suggestion(
1589-
trait_selection_meant_str_literal,
1590-
applicability = "machine-applicable"
1591-
)]
1588+
#[multipart_suggestion(trait_selection_meant_str_literal, applicability = "machine-applicable")]
15921589
MeantStrLiteral {
15931590
#[suggestion_part(code = "\"")]
15941591
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
@@ -165,7 +165,6 @@
165165
//
166166
// Language features:
167167
// tidy-alphabetical-start
168-
#![cfg_attr(bootstrap, feature(c_unwind))]
169168
#![cfg_attr(not(test), feature(coroutine_trait))]
170169
#![cfg_attr(test, feature(panic_update_hook))]
171170
#![cfg_attr(test, feature(test))]

library/core/src/char/methods.rs

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

library/core/src/intrinsics.rs

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

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

2388-
#[cfg(bootstrap)]
2389-
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
2390-
#[rustc_safe_intrinsic]
2391-
#[rustc_nounwind]
2392-
pub fn variant_count<T>() -> usize;
2393-
23942349
/// Rust's "try catch" construct for unwinding. Invokes the function pointer `try_fn` with the
23952350
/// data pointer `data`, and calls `catch_fn` if unwinding occurs while `try_fn` runs.
23962351
///
@@ -2768,7 +2723,6 @@ pub unsafe fn vtable_align(_ptr: *const ()) -> usize {
27682723
#[rustc_const_stable(feature = "const_size_of", since = "1.40.0")]
27692724
#[rustc_intrinsic]
27702725
#[rustc_intrinsic_must_be_overridden]
2771-
#[cfg(not(bootstrap))]
27722726
pub const fn size_of<T>() -> usize {
27732727
unreachable!()
27742728
}
@@ -2786,7 +2740,6 @@ pub const fn size_of<T>() -> usize {
27862740
#[rustc_const_stable(feature = "const_min_align_of", since = "1.40.0")]
27872741
#[rustc_intrinsic]
27882742
#[rustc_intrinsic_must_be_overridden]
2789-
#[cfg(not(bootstrap))]
27902743
pub const fn min_align_of<T>() -> usize {
27912744
unreachable!()
27922745
}
@@ -2800,7 +2753,6 @@ pub const fn min_align_of<T>() -> usize {
28002753
#[rustc_const_unstable(feature = "const_pref_align_of", issue = "91971")]
28012754
#[rustc_intrinsic]
28022755
#[rustc_intrinsic_must_be_overridden]
2803-
#[cfg(not(bootstrap))]
28042756
pub const unsafe fn pref_align_of<T>() -> usize {
28052757
unreachable!()
28062758
}
@@ -2819,7 +2771,6 @@ pub const unsafe fn pref_align_of<T>() -> usize {
28192771
#[rustc_const_unstable(feature = "variant_count", issue = "73662")]
28202772
#[rustc_intrinsic]
28212773
#[rustc_intrinsic_must_be_overridden]
2822-
#[cfg(not(bootstrap))]
28232774
pub const fn variant_count<T>() -> usize {
28242775
unreachable!()
28252776
}
@@ -2836,7 +2787,6 @@ pub const fn variant_count<T>() -> usize {
28362787
#[rustc_const_unstable(feature = "const_size_of_val", issue = "46571")]
28372788
#[rustc_intrinsic]
28382789
#[rustc_intrinsic_must_be_overridden]
2839-
#[cfg(not(bootstrap))]
28402790
pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
28412791
unreachable!()
28422792
}
@@ -2853,7 +2803,6 @@ pub const unsafe fn size_of_val<T: ?Sized>(_ptr: *const T) -> usize {
28532803
#[rustc_const_unstable(feature = "const_align_of_val", issue = "46571")]
28542804
#[rustc_intrinsic]
28552805
#[rustc_intrinsic_must_be_overridden]
2856-
#[cfg(not(bootstrap))]
28572806
pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
28582807
unreachable!()
28592808
}
@@ -2871,7 +2820,6 @@ pub const unsafe fn min_align_of_val<T: ?Sized>(_ptr: *const T) -> usize {
28712820
#[rustc_const_unstable(feature = "const_type_name", issue = "63084")]
28722821
#[rustc_intrinsic]
28732822
#[rustc_intrinsic_must_be_overridden]
2874-
#[cfg(not(bootstrap))]
28752823
pub const fn type_name<T: ?Sized>() -> &'static str {
28762824
unreachable!()
28772825
}
@@ -2891,7 +2839,6 @@ pub const fn type_name<T: ?Sized>() -> &'static str {
28912839
#[rustc_const_unstable(feature = "const_type_id", issue = "77125")]
28922840
#[rustc_intrinsic]
28932841
#[rustc_intrinsic_must_be_overridden]
2894-
#[cfg(not(bootstrap))]
28952842
pub const fn type_id<T: ?Sized + 'static>() -> u128 {
28962843
unreachable!()
28972844
}

library/core/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,6 @@
193193
//
194194
// Language features:
195195
// tidy-alphabetical-start
196-
#![cfg_attr(bootstrap, feature(c_unwind))]
197-
#![cfg_attr(bootstrap, feature(effects))]
198196
#![feature(abi_unadjusted)]
199197
#![feature(adt_const_params)]
200198
#![feature(allow_internal_unsafe)]

library/core/src/marker.rs

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

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

0 commit comments

Comments
 (0)