Skip to content

Commit e18c81e

Browse files
Step bootstrap cfgs
1 parent 377c518 commit e18c81e

File tree

44 files changed

+39
-283
lines changed

Some content is hidden

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

44 files changed

+39
-283
lines changed

compiler/rustc_ast/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#![doc(rust_logo)]
1212
#![allow(internal_features)]
1313
#![feature(rustdoc_internals)]
14-
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
1514
#![feature(associated_type_defaults)]
1615
#![feature(box_patterns)]
1716
#![feature(if_let_guard)]

compiler/rustc_borrowck/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![feature(rustdoc_internals)]
55
#![doc(rust_logo)]
66
#![feature(assert_matches)]
7-
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
87
#![feature(box_patterns)]
98
#![feature(control_flow_enum)]
109
#![feature(let_chains)]

compiler/rustc_codegen_gcc/example/mini_core.rs

-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,6 @@ pub fn panic(_msg: &'static str) -> ! {
420420

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

compiler/rustc_codegen_gcc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
trusted_len,
2424
hash_raw_entry
2525
)]
26-
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
2726
#![allow(broken_intra_doc_links)]
2827
#![recursion_limit = "256"]
2928
#![warn(rust_2018_idioms)]

compiler/rustc_codegen_ssa/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![allow(internal_features)]
55
#![allow(rustc::diagnostic_outside_of_impl)]
66
#![allow(rustc::untranslatable_diagnostic)]
7-
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
87
#![feature(box_patterns)]
98
#![feature(if_let_guard)]
109
#![feature(let_chains)]

compiler/rustc_expand/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![doc(rust_logo)]
22
#![feature(rustdoc_internals)]
33
#![feature(array_windows)]
4-
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
54
#![feature(associated_type_defaults)]
65
#![feature(if_let_guard)]
76
#![feature(let_chains)]

compiler/rustc_infer/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#![allow(internal_features)]
1919
#![allow(rustc::diagnostic_outside_of_impl)]
2020
#![allow(rustc::untranslatable_diagnostic)]
21-
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
2221
#![feature(box_patterns)]
2322
#![feature(control_flow_enum)]
2423
#![feature(extend_one)]

compiler/rustc_metadata/src/rmeta/decoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
12611261
sess: &'a Session,
12621262
) -> impl Iterator<Item = ModChild> + 'a {
12631263
iter::from_coroutine(
1264-
#[cfg_attr(not(bootstrap), coroutine)]
1264+
#[coroutine]
12651265
move || {
12661266
if let Some(data) = &self.root.proc_macro_data {
12671267
// If we are loading as a proc macro, we want to return

compiler/rustc_middle/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#![feature(coroutines)]
3838
#![feature(stmt_expr_attributes)]
3939
#![feature(if_let_guard)]
40-
#![cfg_attr(bootstrap, feature(inline_const))]
4140
#![feature(iter_from_coroutine)]
4241
#![feature(negative_impls)]
4342
#![feature(never_type)]
@@ -48,7 +47,6 @@
4847
#![feature(trusted_len)]
4948
#![feature(type_alias_impl_trait)]
5049
#![feature(strict_provenance)]
51-
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
5250
#![feature(rustc_attrs)]
5351
#![feature(control_flow_enum)]
5452
#![feature(trait_upcasting)]

compiler/rustc_middle/src/ty/closure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ pub fn analyze_coroutine_closure_captures<'a, 'tcx: 'a, T>(
424424
mut for_each: impl FnMut((usize, &'a CapturedPlace<'tcx>), (usize, &'a CapturedPlace<'tcx>)) -> T,
425425
) -> impl Iterator<Item = T> + Captures<'a> + Captures<'tcx> {
426426
std::iter::from_coroutine(
427-
#[cfg_attr(not(bootstrap), coroutine)]
427+
#[coroutine]
428428
move || {
429429
let mut child_captures = child_captures.into_iter().enumerate().peekable();
430430

compiler/rustc_middle/src/ty/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ impl<'tcx> TyCtxt<'tcx> {
12851285

12861286
let definitions = &self.untracked.definitions;
12871287
std::iter::from_coroutine(
1288-
#[cfg_attr(not(bootstrap), coroutine)]
1288+
#[coroutine]
12891289
|| {
12901290
let mut i = 0;
12911291

compiler/rustc_mir_build/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![allow(rustc::diagnostic_outside_of_impl)]
66
#![allow(rustc::untranslatable_diagnostic)]
77
#![feature(assert_matches)]
8-
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
98
#![feature(box_patterns)]
109
#![feature(if_let_guard)]
1110
#![feature(let_chains)]

compiler/rustc_mir_transform/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#![feature(cow_is_borrowed)]
55
#![feature(decl_macro)]
66
#![feature(impl_trait_in_assoc_type)]
7-
#![cfg_attr(bootstrap, feature(inline_const))]
87
#![feature(is_sorted)]
98
#![feature(let_chains)]
109
#![feature(map_try_insert)]

compiler/rustc_serialize/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
#![doc(rust_logo)]
99
#![allow(internal_features)]
1010
#![feature(rustdoc_internals)]
11-
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
1211
#![feature(const_option)]
1312
#![feature(core_intrinsics)]
14-
#![cfg_attr(bootstrap, feature(inline_const))]
1513
#![feature(min_specialization)]
1614
#![feature(never_type)]
1715
#![feature(ptr_sub_ptr)]

compiler/rustc_trait_selection/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#![allow(rustc::diagnostic_outside_of_impl)]
1818
#![allow(rustc::untranslatable_diagnostic)]
1919
#![feature(assert_matches)]
20-
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
2120
#![feature(associated_type_defaults)]
2221
#![feature(box_patterns)]
2322
#![feature(control_flow_enum)]

library/alloc/src/lib.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@
165165
//
166166
// Language features:
167167
// tidy-alphabetical-start
168-
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
169-
#![cfg_attr(bootstrap, feature(inline_const))]
170-
#![cfg_attr(not(bootstrap), rustc_preserve_ub_checks)]
171168
#![cfg_attr(not(test), feature(coroutine_trait))]
172169
#![cfg_attr(test, feature(panic_update_hook))]
173170
#![cfg_attr(test, feature(test))]
@@ -198,6 +195,7 @@
198195
#![feature(unboxed_closures)]
199196
#![feature(unsized_fn_params)]
200197
#![feature(with_negative_coherence)]
198+
#![rustc_preserve_ub_checks]
201199
// tidy-alphabetical-end
202200
//
203201
// Rustdoc features:

library/alloc/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![cfg_attr(bootstrap, feature(associated_type_bounds))]
21
#![feature(allocator_api)]
32
#![feature(alloc_layout_extra)]
43
#![feature(iter_array_chunks)]

library/core/src/cmp.rs

+10-28
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ pub struct AssertParamIsEq<T: Eq + ?Sized> {
379379
// This is a lang item only so that `BinOp::Cmp` in MIR can return it.
380380
// It has no special behaviour, but does require that the three variants
381381
// `Less`/`Equal`/`Greater` remain `-1_i8`/`0_i8`/`+1_i8` respectively.
382-
#[cfg_attr(not(bootstrap), lang = "Ordering")]
382+
#[lang = "Ordering"]
383383
#[repr(i8)]
384384
pub enum Ordering {
385385
/// An ordering where a compared value is less than another.
@@ -852,7 +852,7 @@ pub trait Ord: Eq + PartialOrd<Self> {
852852
#[stable(feature = "ord_max_min", since = "1.21.0")]
853853
#[inline]
854854
#[must_use]
855-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_ord_max")]
855+
#[rustc_diagnostic_item = "cmp_ord_max"]
856856
fn max(self, other: Self) -> Self
857857
where
858858
Self: Sized,
@@ -873,7 +873,7 @@ pub trait Ord: Eq + PartialOrd<Self> {
873873
#[stable(feature = "ord_max_min", since = "1.21.0")]
874874
#[inline]
875875
#[must_use]
876-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_ord_min")]
876+
#[rustc_diagnostic_item = "cmp_ord_min"]
877877
fn min(self, other: Self) -> Self
878878
where
879879
Self: Sized,
@@ -1160,7 +1160,7 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
11601160
/// ```
11611161
#[must_use]
11621162
#[stable(feature = "rust1", since = "1.0.0")]
1163-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialord_cmp")]
1163+
#[rustc_diagnostic_item = "cmp_partialord_cmp"]
11641164
fn partial_cmp(&self, other: &Rhs) -> Option<Ordering>;
11651165

11661166
/// This method tests less than (for `self` and `other`) and is used by the `<` operator.
@@ -1175,7 +1175,7 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
11751175
#[inline]
11761176
#[must_use]
11771177
#[stable(feature = "rust1", since = "1.0.0")]
1178-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialord_lt")]
1178+
#[rustc_diagnostic_item = "cmp_partialord_lt"]
11791179
fn lt(&self, other: &Rhs) -> bool {
11801180
matches!(self.partial_cmp(other), Some(Less))
11811181
}
@@ -1193,7 +1193,7 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
11931193
#[inline]
11941194
#[must_use]
11951195
#[stable(feature = "rust1", since = "1.0.0")]
1196-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialord_le")]
1196+
#[rustc_diagnostic_item = "cmp_partialord_le"]
11971197
fn le(&self, other: &Rhs) -> bool {
11981198
matches!(self.partial_cmp(other), Some(Less | Equal))
11991199
}
@@ -1210,7 +1210,7 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
12101210
#[inline]
12111211
#[must_use]
12121212
#[stable(feature = "rust1", since = "1.0.0")]
1213-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialord_gt")]
1213+
#[rustc_diagnostic_item = "cmp_partialord_gt"]
12141214
fn gt(&self, other: &Rhs) -> bool {
12151215
matches!(self.partial_cmp(other), Some(Greater))
12161216
}
@@ -1228,7 +1228,7 @@ pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
12281228
#[inline]
12291229
#[must_use]
12301230
#[stable(feature = "rust1", since = "1.0.0")]
1231-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialord_ge")]
1231+
#[rustc_diagnostic_item = "cmp_partialord_ge"]
12321232
fn ge(&self, other: &Rhs) -> bool {
12331233
matches!(self.partial_cmp(other), Some(Greater | Equal))
12341234
}
@@ -1558,14 +1558,7 @@ mod impls {
15581558
impl PartialOrd for $t {
15591559
#[inline]
15601560
fn partial_cmp(&self, other: &$t) -> Option<Ordering> {
1561-
#[cfg(bootstrap)]
1562-
{
1563-
Some(self.cmp(other))
1564-
}
1565-
#[cfg(not(bootstrap))]
1566-
{
1567-
Some(crate::intrinsics::three_way_compare(*self, *other))
1568-
}
1561+
Some(crate::intrinsics::three_way_compare(*self, *other))
15691562
}
15701563
#[inline(always)]
15711564
fn lt(&self, other: &$t) -> bool { (*self) < (*other) }
@@ -1581,18 +1574,7 @@ mod impls {
15811574
impl Ord for $t {
15821575
#[inline]
15831576
fn cmp(&self, other: &$t) -> Ordering {
1584-
#[cfg(bootstrap)]
1585-
{
1586-
// The order here is important to generate more optimal assembly.
1587-
// See <https://github.com/rust-lang/rust/issues/63758> for more info.
1588-
if *self < *other { Less }
1589-
else if *self == *other { Equal }
1590-
else { Greater }
1591-
}
1592-
#[cfg(not(bootstrap))]
1593-
{
1594-
crate::intrinsics::three_way_compare(*self, *other)
1595-
}
1577+
crate::intrinsics::three_way_compare(*self, *other)
15961578
}
15971579
}
15981580
)*)

library/core/src/default.rs

-2
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,7 @@ default_impl! { i32, 0, "Returns the default value of `0`" }
178178
default_impl! { i64, 0, "Returns the default value of `0`" }
179179
default_impl! { i128, 0, "Returns the default value of `0`" }
180180

181-
#[cfg(not(bootstrap))]
182181
default_impl! { f16, 0.0f16, "Returns the default value of `0.0`" }
183182
default_impl! { f32, 0.0f32, "Returns the default value of `0.0`" }
184183
default_impl! { f64, 0.0f64, "Returns the default value of `0.0`" }
185-
#[cfg(not(bootstrap))]
186184
default_impl! { f128, 0.0f128, "Returns the default value of `0.0`" }

library/core/src/future/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use crate::ptr::NonNull;
1313
use crate::task::Context;
1414

15-
#[cfg(not(bootstrap))]
1615
mod async_drop;
1716
mod future;
1817
mod into_future;
@@ -38,7 +37,6 @@ pub use ready::{ready, Ready};
3837
#[stable(feature = "future_poll_fn", since = "1.64.0")]
3938
pub use poll_fn::{poll_fn, PollFn};
4039

41-
#[cfg(not(bootstrap))]
4240
#[unstable(feature = "async_drop", issue = "none")]
4341
pub use async_drop::{async_drop, async_drop_in_place, AsyncDrop, AsyncDropInPlace};
4442

0 commit comments

Comments
 (0)