Skip to content

Commit 7f1eb90

Browse files
committed
update cfg(bootstrap)s
1 parent 28a91e6 commit 7f1eb90

File tree

10 files changed

+21
-175
lines changed

10 files changed

+21
-175
lines changed

core/src/async_iter/async_iter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::task::{Context, Poll};
1313
#[unstable(feature = "async_iterator", issue = "79024")]
1414
#[must_use = "async iterators do nothing unless polled"]
1515
#[doc(alias = "Stream")]
16-
#[cfg_attr(not(bootstrap), lang = "async_iterator")]
16+
#[lang = "async_iterator"]
1717
pub trait AsyncIterator {
1818
/// The type of items yielded by the async iterator.
1919
type Item;
@@ -116,21 +116,21 @@ impl<T> Poll<Option<T>> {
116116
/// A helper function for internal desugaring -- produces `Ready(Some(t))`,
117117
/// which corresponds to the async iterator yielding a value.
118118
#[unstable(feature = "async_gen_internals", issue = "none")]
119-
#[cfg_attr(not(bootstrap), lang = "AsyncGenReady")]
119+
#[lang = "AsyncGenReady"]
120120
pub fn async_gen_ready(t: T) -> Self {
121121
Poll::Ready(Some(t))
122122
}
123123

124124
/// A helper constant for internal desugaring -- produces `Pending`,
125125
/// which corresponds to the async iterator pending on an `.await`.
126126
#[unstable(feature = "async_gen_internals", issue = "none")]
127-
#[cfg_attr(not(bootstrap), lang = "AsyncGenPending")]
127+
#[lang = "AsyncGenPending"]
128128
// FIXME(gen_blocks): This probably could be deduplicated.
129129
pub const PENDING: Self = Poll::Pending;
130130

131131
/// A helper constant for internal desugaring -- produces `Ready(None)`,
132132
/// which corresponds to the async iterator finishing its iteration.
133133
#[unstable(feature = "async_gen_internals", issue = "none")]
134-
#[cfg_attr(not(bootstrap), lang = "AsyncGenFinished")]
134+
#[lang = "AsyncGenFinished"]
135135
pub const FINISHED: Self = Poll::Ready(None);
136136
}

core/src/cmp.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -224,21 +224,21 @@ use self::Ordering::*;
224224
append_const_msg
225225
)]
226226
#[rustc_diagnostic_item = "PartialEq"]
227-
#[cfg_attr(not(bootstrap), const_trait)]
227+
#[const_trait]
228228
pub trait PartialEq<Rhs: ?Sized = Self> {
229229
/// This method tests for `self` and `other` values to be equal, and is used
230230
/// by `==`.
231231
#[must_use]
232232
#[stable(feature = "rust1", since = "1.0.0")]
233-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialeq_eq")]
233+
#[rustc_diagnostic_item = "cmp_partialeq_eq"]
234234
fn eq(&self, other: &Rhs) -> bool;
235235

236236
/// This method tests for `!=`. The default implementation is almost always
237237
/// sufficient, and should not be overridden without very good reason.
238238
#[inline]
239239
#[must_use]
240240
#[stable(feature = "rust1", since = "1.0.0")]
241-
#[cfg_attr(not(bootstrap), rustc_diagnostic_item = "cmp_partialeq_ne")]
241+
#[rustc_diagnostic_item = "cmp_partialeq_ne"]
242242
fn ne(&self, other: &Rhs) -> bool {
243243
!self.eq(other)
244244
}
@@ -1416,18 +1416,8 @@ mod impls {
14161416

14171417
macro_rules! partial_eq_impl {
14181418
($($t:ty)*) => ($(
1419-
#[stable(feature = "rust1", since = "1.0.0")]
1420-
#[cfg(bootstrap)]
1421-
impl PartialEq for $t {
1422-
#[inline]
1423-
fn eq(&self, other: &$t) -> bool { (*self) == (*other) }
1424-
#[inline]
1425-
fn ne(&self, other: &$t) -> bool { (*self) != (*other) }
1426-
}
1427-
14281419
#[stable(feature = "rust1", since = "1.0.0")]
14291420
#[rustc_const_unstable(feature = "const_cmp", issue = "92391")]
1430-
#[cfg(not(bootstrap))]
14311421
impl const PartialEq for $t {
14321422
#[inline]
14331423
fn eq(&self, other: &$t) -> bool { (*self) == (*other) }

core/src/intrinsics/simd.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ extern "platform-intrinsic" {
257257
/// type).
258258
///
259259
/// `mask` must only contain `0` or `!0` values.
260-
#[cfg(not(bootstrap))]
261260
pub fn simd_masked_load<V, U, T>(mask: V, ptr: U, val: T) -> T;
262261

263262
/// Write to a vector of pointers.
@@ -277,7 +276,6 @@ extern "platform-intrinsic" {
277276
/// type).
278277
///
279278
/// `mask` must only contain `0` or `!0` values.
280-
#[cfg(not(bootstrap))]
281279
pub fn simd_masked_store<V, U, T>(mask: V, ptr: U, val: T);
282280

283281
/// Add two simd vectors elementwise, with saturation.

core/src/ptr/const_ptr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,7 @@ impl<T> *const [T] {
17721772
#[stable(feature = "rust1", since = "1.0.0")]
17731773
impl<T: ?Sized> PartialEq for *const T {
17741774
#[inline]
1775-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1775+
#[allow(ambiguous_wide_pointer_comparisons)]
17761776
fn eq(&self, other: &*const T) -> bool {
17771777
*self == *other
17781778
}
@@ -1785,7 +1785,7 @@ impl<T: ?Sized> Eq for *const T {}
17851785
#[stable(feature = "rust1", since = "1.0.0")]
17861786
impl<T: ?Sized> Ord for *const T {
17871787
#[inline]
1788-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1788+
#[allow(ambiguous_wide_pointer_comparisons)]
17891789
fn cmp(&self, other: &*const T) -> Ordering {
17901790
if self < other {
17911791
Less
@@ -1805,25 +1805,25 @@ impl<T: ?Sized> PartialOrd for *const T {
18051805
}
18061806

18071807
#[inline]
1808-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1808+
#[allow(ambiguous_wide_pointer_comparisons)]
18091809
fn lt(&self, other: &*const T) -> bool {
18101810
*self < *other
18111811
}
18121812

18131813
#[inline]
1814-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1814+
#[allow(ambiguous_wide_pointer_comparisons)]
18151815
fn le(&self, other: &*const T) -> bool {
18161816
*self <= *other
18171817
}
18181818

18191819
#[inline]
1820-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1820+
#[allow(ambiguous_wide_pointer_comparisons)]
18211821
fn gt(&self, other: &*const T) -> bool {
18221822
*self > *other
18231823
}
18241824

18251825
#[inline]
1826-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1826+
#[allow(ambiguous_wide_pointer_comparisons)]
18271827
fn ge(&self, other: &*const T) -> bool {
18281828
*self >= *other
18291829
}

core/src/ptr/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1900,7 +1900,7 @@ pub(crate) const unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usiz
19001900
#[inline(always)]
19011901
#[must_use = "pointer comparison produces a value"]
19021902
#[rustc_diagnostic_item = "ptr_eq"]
1903-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))] // it's actually clear here
1903+
#[allow(ambiguous_wide_pointer_comparisons)] // it's actually clear here
19041904
pub fn eq<T: ?Sized>(a: *const T, b: *const T) -> bool {
19051905
a == b
19061906
}

core/src/ptr/mut_ptr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2199,7 +2199,7 @@ impl<T> *mut [T] {
21992199
#[stable(feature = "rust1", since = "1.0.0")]
22002200
impl<T: ?Sized> PartialEq for *mut T {
22012201
#[inline(always)]
2202-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2202+
#[allow(ambiguous_wide_pointer_comparisons)]
22032203
fn eq(&self, other: &*mut T) -> bool {
22042204
*self == *other
22052205
}
@@ -2211,7 +2211,7 @@ impl<T: ?Sized> Eq for *mut T {}
22112211
#[stable(feature = "rust1", since = "1.0.0")]
22122212
impl<T: ?Sized> Ord for *mut T {
22132213
#[inline]
2214-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2214+
#[allow(ambiguous_wide_pointer_comparisons)]
22152215
fn cmp(&self, other: &*mut T) -> Ordering {
22162216
if self < other {
22172217
Less
@@ -2231,25 +2231,25 @@ impl<T: ?Sized> PartialOrd for *mut T {
22312231
}
22322232

22332233
#[inline(always)]
2234-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2234+
#[allow(ambiguous_wide_pointer_comparisons)]
22352235
fn lt(&self, other: &*mut T) -> bool {
22362236
*self < *other
22372237
}
22382238

22392239
#[inline(always)]
2240-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2240+
#[allow(ambiguous_wide_pointer_comparisons)]
22412241
fn le(&self, other: &*mut T) -> bool {
22422242
*self <= *other
22432243
}
22442244

22452245
#[inline(always)]
2246-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2246+
#[allow(ambiguous_wide_pointer_comparisons)]
22472247
fn gt(&self, other: &*mut T) -> bool {
22482248
*self > *other
22492249
}
22502250

22512251
#[inline(always)]
2252-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
2252+
#[allow(ambiguous_wide_pointer_comparisons)]
22532253
fn ge(&self, other: &*mut T) -> bool {
22542254
*self >= *other
22552255
}

core/src/ptr/non_null.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ impl<T: ?Sized> Eq for NonNull<T> {}
17911791
#[stable(feature = "nonnull", since = "1.25.0")]
17921792
impl<T: ?Sized> PartialEq for NonNull<T> {
17931793
#[inline]
1794-
#[cfg_attr(not(bootstrap), allow(ambiguous_wide_pointer_comparisons))]
1794+
#[allow(ambiguous_wide_pointer_comparisons)]
17951795
fn eq(&self, other: &Self) -> bool {
17961796
self.as_ptr() == other.as_ptr()
17971797
}

core/src/tuple.rs

Lines changed: 0 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -8,146 +8,6 @@ use crate::marker::{StructuralEq, StructuralPartialEq};
88
//
99
// Also provides implementations for tuples with lesser arity. For example, tuple_impls!(A B C)
1010
// will implement everything for (A, B, C), (A, B) and (A,).
11-
#[cfg(bootstrap)]
12-
macro_rules! tuple_impls {
13-
// Stopping criteria (1-ary tuple)
14-
($T:ident) => {
15-
tuple_impls!(@impl $T);
16-
};
17-
// Running criteria (n-ary tuple, with n >= 2)
18-
($T:ident $( $U:ident )+) => {
19-
tuple_impls!($( $U )+);
20-
tuple_impls!(@impl $T $( $U )+);
21-
};
22-
// "Private" internal implementation
23-
(@impl $( $T:ident )+) => {
24-
maybe_tuple_doc! {
25-
$($T)+ @
26-
#[stable(feature = "rust1", since = "1.0.0")]
27-
impl<$($T: PartialEq),+> PartialEq for ($($T,)+)
28-
where
29-
last_type!($($T,)+): ?Sized
30-
{
31-
#[inline]
32-
fn eq(&self, other: &($($T,)+)) -> bool {
33-
$( ${ignore(T)} self.${index()} == other.${index()} )&&+
34-
}
35-
#[inline]
36-
fn ne(&self, other: &($($T,)+)) -> bool {
37-
$( ${ignore(T)} self.${index()} != other.${index()} )||+
38-
}
39-
}
40-
}
41-
42-
maybe_tuple_doc! {
43-
$($T)+ @
44-
#[stable(feature = "rust1", since = "1.0.0")]
45-
impl<$($T: Eq),+> Eq for ($($T,)+)
46-
where
47-
last_type!($($T,)+): ?Sized
48-
{}
49-
}
50-
51-
maybe_tuple_doc! {
52-
$($T)+ @
53-
#[unstable(feature = "structural_match", issue = "31434")]
54-
impl<$($T: ConstParamTy),+> ConstParamTy for ($($T,)+) {}
55-
}
56-
57-
maybe_tuple_doc! {
58-
$($T)+ @
59-
#[unstable(feature = "structural_match", issue = "31434")]
60-
impl<$($T),+> StructuralPartialEq for ($($T,)+) {}
61-
}
62-
63-
maybe_tuple_doc! {
64-
$($T)+ @
65-
#[unstable(feature = "structural_match", issue = "31434")]
66-
impl<$($T),+> StructuralEq for ($($T,)+) {}
67-
}
68-
69-
maybe_tuple_doc! {
70-
$($T)+ @
71-
#[stable(feature = "rust1", since = "1.0.0")]
72-
impl<$($T: PartialOrd),+> PartialOrd for ($($T,)+)
73-
where
74-
last_type!($($T,)+): ?Sized
75-
{
76-
#[inline]
77-
fn partial_cmp(&self, other: &($($T,)+)) -> Option<Ordering> {
78-
lexical_partial_cmp!($( ${ignore(T)} self.${index()}, other.${index()} ),+)
79-
}
80-
#[inline]
81-
fn lt(&self, other: &($($T,)+)) -> bool {
82-
lexical_ord!(lt, Less, $( ${ignore(T)} self.${index()}, other.${index()} ),+)
83-
}
84-
#[inline]
85-
fn le(&self, other: &($($T,)+)) -> bool {
86-
lexical_ord!(le, Less, $( ${ignore(T)} self.${index()}, other.${index()} ),+)
87-
}
88-
#[inline]
89-
fn ge(&self, other: &($($T,)+)) -> bool {
90-
lexical_ord!(ge, Greater, $( ${ignore(T)} self.${index()}, other.${index()} ),+)
91-
}
92-
#[inline]
93-
fn gt(&self, other: &($($T,)+)) -> bool {
94-
lexical_ord!(gt, Greater, $( ${ignore(T)} self.${index()}, other.${index()} ),+)
95-
}
96-
}
97-
}
98-
99-
maybe_tuple_doc! {
100-
$($T)+ @
101-
#[stable(feature = "rust1", since = "1.0.0")]
102-
impl<$($T: Ord),+> Ord for ($($T,)+)
103-
where
104-
last_type!($($T,)+): ?Sized
105-
{
106-
#[inline]
107-
fn cmp(&self, other: &($($T,)+)) -> Ordering {
108-
lexical_cmp!($( ${ignore(T)} self.${index()}, other.${index()} ),+)
109-
}
110-
}
111-
}
112-
113-
maybe_tuple_doc! {
114-
$($T)+ @
115-
#[stable(feature = "rust1", since = "1.0.0")]
116-
impl<$($T: Default),+> Default for ($($T,)+) {
117-
#[inline]
118-
fn default() -> ($($T,)+) {
119-
($($T::default(),)+)
120-
}
121-
}
122-
}
123-
124-
#[stable(feature = "array_tuple_conv", since = "1.71.0")]
125-
impl<T> From<[T; ${count(T)}]> for ($(${ignore(T)} T,)+) {
126-
#[inline]
127-
#[allow(non_snake_case)]
128-
fn from(array: [T; ${count(T)}]) -> Self {
129-
let [$($T,)+] = array;
130-
($($T,)+)
131-
}
132-
}
133-
134-
#[stable(feature = "array_tuple_conv", since = "1.71.0")]
135-
impl<T> From<($(${ignore(T)} T,)+)> for [T; ${count(T)}] {
136-
#[inline]
137-
#[allow(non_snake_case)]
138-
fn from(tuple: ($(${ignore(T)} T,)+)) -> Self {
139-
let ($($T,)+) = tuple;
140-
[$($T,)+]
141-
}
142-
}
143-
}
144-
}
145-
146-
// Recursive macro for implementing n-ary tuple functions and operations
147-
//
148-
// Also provides implementations for tuples with lesser arity. For example, tuple_impls!(A B C)
149-
// will implement everything for (A, B, C), (A, B) and (A,).
150-
#[cfg(not(bootstrap))]
15111
macro_rules! tuple_impls {
15212
// Stopping criteria (1-ary tuple)
15313
($T:ident) => {

core/tests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
#![feature(slice_flatten)]
112112
#![feature(error_generic_member_access)]
113113
#![feature(error_in_core)]
114-
#![cfg_attr(bootstrap, feature(trait_upcasting))]
115114
#![feature(utf8_chunks)]
116115
#![feature(is_ascii_octdigit)]
117116
#![feature(get_many_mut)]

std/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@
308308
//
309309
// Library features (core):
310310
// tidy-alphabetical-start
311-
#![cfg_attr(bootstrap, feature(c_str_literals))]
312311
#![feature(char_internals)]
313312
#![feature(core_intrinsics)]
314313
#![feature(core_io_borrowed_buf)]

0 commit comments

Comments
 (0)