Skip to content

Commit d823ae6

Browse files
Bump cfg(bootstrap)s
1 parent 663cb72 commit d823ae6

File tree

14 files changed

+24
-37
lines changed

14 files changed

+24
-37
lines changed

alloc/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@
7878
not(no_sync),
7979
target_has_atomic = "ptr"
8080
))]
81-
#![cfg_attr(not(bootstrap), doc(rust_logo))]
82-
#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
81+
#![doc(rust_logo)]
82+
#![feature(rustdoc_internals)]
8383
#![no_std]
8484
#![needs_allocator]
8585
// Lints:

core/src/iter/sources/from_coroutine.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ use crate::pin::Pin;
1111
/// # Examples
1212
///
1313
/// ```
14-
/// #![cfg_attr(bootstrap, feature(generators))]
15-
/// #![cfg_attr(not(bootstrap), feature(coroutines))]
14+
/// #![feature(coroutines)]
1615
/// #![feature(iter_from_coroutine)]
1716
///
1817
/// let it = std::iter::from_coroutine(|| {

core/src/iter/traits/iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn _assert_is_object_safe(_: &dyn Iterator<Item = ()>) {}
6969
message = "`{Self}` is not an iterator"
7070
)]
7171
#[doc(notable_trait)]
72-
#[cfg_attr(not(bootstrap), lang = "iterator")]
72+
#[lang = "iterator"]
7373
#[rustc_diagnostic_item = "Iterator"]
7474
#[must_use = "iterators are lazy and do nothing unless consumed"]
7575
pub trait Iterator {

core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
test(no_crate_inject, attr(deny(warnings))),
7070
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
7171
)]
72-
#![cfg_attr(not(bootstrap), doc(rust_logo))]
72+
#![doc(rust_logo)]
7373
#![doc(cfg_hide(
7474
not(test),
7575
any(not(feature = "miri-test-libstd"), test, doctest),

core/src/mem/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,7 @@ impl<T> SizedTypeProperties for T {}
13581358
///
13591359
/// ```
13601360
/// #![feature(offset_of)]
1361-
/// # #![cfg_attr(not(bootstrap), feature(offset_of_enum))]
1361+
/// # #![feature(offset_of_enum)]
13621362
///
13631363
/// use std::mem;
13641364
/// #[repr(C)]
@@ -1388,12 +1388,9 @@ impl<T> SizedTypeProperties for T {}
13881388
/// B { one: u8, two: u16 },
13891389
/// }
13901390
///
1391-
/// # #[cfg(not(bootstrap))]
13921391
/// assert_eq!(mem::offset_of!(Enum, A.0), 1);
1393-
/// # #[cfg(not(bootstrap))]
13941392
/// assert_eq!(mem::offset_of!(Enum, B.two), 2);
13951393
///
1396-
/// # #[cfg(not(bootstrap))]
13971394
/// assert_eq!(mem::offset_of!(Option<&u8>, Some.0), 0);
13981395
/// ```
13991396
#[unstable(feature = "offset_of", issue = "106655")]

core/src/ops/coroutine.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ use crate::pin::Pin;
77
/// possible return values of a coroutine. Currently this corresponds to either
88
/// a suspension point (`Yielded`) or a termination point (`Complete`).
99
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
10-
#[cfg_attr(bootstrap, lang = "generator_state")]
11-
#[cfg_attr(not(bootstrap), lang = "coroutine_state")]
10+
#[lang = "coroutine_state"]
1211
#[unstable(feature = "coroutine_trait", issue = "43122")]
1312
pub enum CoroutineState<Y, R> {
1413
/// The coroutine suspended with a value.
@@ -40,8 +39,7 @@ pub enum CoroutineState<Y, R> {
4039
/// closure-like:
4140
///
4241
/// ```rust
43-
/// #![cfg_attr(bootstrap, feature(generators))]
44-
/// #![cfg_attr(not(bootstrap), feature(coroutines))]
42+
/// #![feature(coroutines)]
4543
/// #![feature(coroutine_trait)]
4644
///
4745
/// use std::ops::{Coroutine, CoroutineState};
@@ -68,8 +66,7 @@ pub enum CoroutineState<Y, R> {
6866
///
6967
/// [RFC 2033]: https://github.com/rust-lang/rfcs/pull/2033
7068
/// [unstable book]: ../../unstable-book/language-features/coroutines.html
71-
#[cfg_attr(bootstrap, lang = "generator")]
72-
#[cfg_attr(not(bootstrap), lang = "coroutine")]
69+
#[lang = "coroutine"]
7370
#[unstable(feature = "coroutine_trait", issue = "43122")]
7471
#[fundamental]
7572
pub trait Coroutine<R = ()> {

core/src/ops/function.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ use crate::marker::Tuple;
5656
#[lang = "fn"]
5757
#[stable(feature = "rust1", since = "1.0.0")]
5858
#[rustc_paren_sugar]
59-
#[cfg_attr(not(bootstrap), rustc_on_unimplemented(
59+
#[rustc_on_unimplemented(
6060
on(
6161
Args = "()",
6262
note = "wrap the `{Self}` in a closure with no arguments: `|| {{ /* code */ }}`"
@@ -69,7 +69,7 @@ use crate::marker::Tuple;
6969
),
7070
message = "expected a `{Trait}` closure, found `{Self}`",
7171
label = "expected an `{Trait}` closure, found `{Self}`"
72-
))]
72+
)]
7373
#[fundamental] // so that regex can rely that `&str: !FnMut`
7474
#[must_use = "closures are lazy and do nothing unless called"]
7575
// FIXME(effects) #[const_trait]
@@ -143,7 +143,7 @@ pub trait Fn<Args: Tuple>: FnMut<Args> {
143143
#[lang = "fn_mut"]
144144
#[stable(feature = "rust1", since = "1.0.0")]
145145
#[rustc_paren_sugar]
146-
#[cfg_attr(not(bootstrap), rustc_on_unimplemented(
146+
#[rustc_on_unimplemented(
147147
on(
148148
Args = "()",
149149
note = "wrap the `{Self}` in a closure with no arguments: `|| {{ /* code */ }}`"
@@ -156,7 +156,7 @@ pub trait Fn<Args: Tuple>: FnMut<Args> {
156156
),
157157
message = "expected a `{Trait}` closure, found `{Self}`",
158158
label = "expected an `{Trait}` closure, found `{Self}`"
159-
))]
159+
)]
160160
#[fundamental] // so that regex can rely that `&str: !FnMut`
161161
#[must_use = "closures are lazy and do nothing unless called"]
162162
// FIXME(effects) #[const_trait]
@@ -222,7 +222,7 @@ pub trait FnMut<Args: Tuple>: FnOnce<Args> {
222222
#[lang = "fn_once"]
223223
#[stable(feature = "rust1", since = "1.0.0")]
224224
#[rustc_paren_sugar]
225-
#[cfg_attr(not(bootstrap), rustc_on_unimplemented(
225+
#[rustc_on_unimplemented(
226226
on(
227227
Args = "()",
228228
note = "wrap the `{Self}` in a closure with no arguments: `|| {{ /* code */ }}`"
@@ -235,7 +235,7 @@ pub trait FnMut<Args: Tuple>: FnOnce<Args> {
235235
),
236236
message = "expected a `{Trait}` closure, found `{Self}`",
237237
label = "expected an `{Trait}` closure, found `{Self}`"
238-
))]
238+
)]
239239
#[fundamental] // so that regex can rely that `&str: !FnMut`
240240
#[must_use = "closures are lazy and do nothing unless called"]
241241
// FIXME(effects) #[const_trait]

core/src/panic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub macro panic_2015 {
4747
#[allow_internal_unstable(core_panic, const_format_args)]
4848
#[rustc_diagnostic_item = "core_panic_2021_macro"]
4949
#[rustc_macro_transparency = "semitransparent"]
50-
#[cfg(any(bootstrap, feature = "panic_immediate_abort"))]
50+
#[cfg(feature = "panic_immediate_abort")]
5151
pub macro panic_2021 {
5252
() => (
5353
$crate::panicking::panic("explicit panic")
@@ -75,7 +75,7 @@ pub macro panic_2021 {
7575
)]
7676
#[rustc_diagnostic_item = "core_panic_2021_macro"]
7777
#[rustc_macro_transparency = "semitransparent"]
78-
#[cfg(not(any(bootstrap, feature = "panic_immediate_abort")))]
78+
#[cfg(not(feature = "panic_immediate_abort"))]
7979
pub macro panic_2021 {
8080
() => ({
8181
// Create a function so that the argument for `track_caller`

core/src/panicking.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,8 @@ pub fn unreachable_display<T: fmt::Display>(x: &T) -> ! {
170170
#[inline]
171171
#[track_caller]
172172
#[rustc_do_not_const_check] // hooked by const-eval
173-
#[cfg_attr(bootstrap, lang = "panic_display")]
174173
// enforce a &&str argument in const-check and hook this by const-eval
175-
#[cfg_attr(not(bootstrap), rustc_const_panic_str)]
174+
#[rustc_const_panic_str]
176175
#[rustc_const_unstable(feature = "core_panic", issue = "none")]
177176
pub const fn panic_display<T: fmt::Display>(x: &T) -> ! {
178177
panic_fmt(format_args!("{}", *x));

core/src/pin.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,8 +1088,7 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
10881088
/// ### With `Coroutine`s
10891089
///
10901090
/// ```rust
1091-
/// #![cfg_attr(bootstrap, feature(generators))]
1092-
/// #![cfg_attr(not(bootstrap), feature(coroutines))]
1091+
/// #![feature(coroutines)]
10931092
/// #![feature(coroutine_trait)]
10941093
/// use core::{
10951094
/// ops::{Coroutine, CoroutineState},

proc_macro/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
test(no_crate_inject, attr(deny(warnings))),
1818
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
1919
)]
20-
#![cfg_attr(not(bootstrap), doc(rust_logo))]
21-
#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
20+
#![doc(rust_logo)]
21+
#![feature(rustdoc_internals)]
2222
// This library is copied into rust-analyzer to allow loading rustc compiled proc macros.
2323
// Please avoid unstable features where possible to minimize the amount of changes necessary
2424
// to make it compile with rust-analyzer on stable.

std/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
test(no_crate_inject, attr(deny(warnings))),
228228
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
229229
)]
230-
#![cfg_attr(not(bootstrap), doc(rust_logo))]
230+
#![doc(rust_logo)]
231231
#![doc(cfg_hide(
232232
not(test),
233233
not(any(test, bootstrap)),

std/src/thread/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -548,10 +548,6 @@ impl Builder {
548548
let main = Box::new(main);
549549
// SAFETY: dynamic size and alignment of the Box remain the same. See below for why the
550550
// lifetime change is justified.
551-
#[cfg(bootstrap)]
552-
let main =
553-
unsafe { mem::transmute::<Box<dyn FnOnce() + 'a>, Box<dyn FnOnce() + 'static>>(main) };
554-
#[cfg(not(bootstrap))]
555551
let main = unsafe { Box::from_raw(Box::into_raw(main) as *mut (dyn FnOnce() + 'static)) };
556552

557553
Ok(JoinInner {

test/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
#![unstable(feature = "test", issue = "50297")]
1818
#![doc(test(attr(deny(warnings))))]
19-
#![cfg_attr(not(bootstrap), doc(rust_logo))]
20-
#![cfg_attr(not(bootstrap), feature(rustdoc_internals))]
19+
#![doc(rust_logo)]
20+
#![feature(rustdoc_internals)]
2121
#![feature(internal_output_capture)]
2222
#![feature(staged_api)]
2323
#![feature(process_exitcode_internals)]

0 commit comments

Comments
 (0)