Skip to content

Commit 6453de7

Browse files
Step bootstrap cfgs
1 parent 6754ce4 commit 6453de7

File tree

28 files changed

+31
-258
lines changed

28 files changed

+31
-258
lines changed

alloc/src/lib.rs

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

alloc/tests/lib.rs

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

core/src/cmp.rs

Lines changed: 10 additions & 28 deletions
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
)*)

core/src/default.rs

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

core/src/future/mod.rs

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