Skip to content

Commit a035fa1

Browse files
Mark-Simulacrumtgross35
authored andcommitted
step cfg(bootstrap)
1 parent 8223006 commit a035fa1

File tree

33 files changed

+11
-152
lines changed

33 files changed

+11
-152
lines changed

compiler/rustc_builtin_macros/src/lib.rs

Lines changed: 0 additions & 1 deletion
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

Lines changed: 1 addition & 4 deletions
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

Lines changed: 1 addition & 5 deletions
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

Lines changed: 1 addition & 2 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 1 addition & 6 deletions
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

Lines changed: 1 addition & 4 deletions
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

Lines changed: 1 addition & 3 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 1 addition & 4 deletions
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 = "1.81.0"
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/intrinsics.rs

Lines changed: 0 additions & 53 deletions
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 0 additions & 2 deletions
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)