about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/iter/sources/from_coroutine.rs3
-rw-r--r--library/core/src/iter/traits/iterator.rs2
-rw-r--r--library/core/src/lib.rs2
-rw-r--r--library/core/src/mem/mod.rs5
-rw-r--r--library/core/src/ops/coroutine.rs9
-rw-r--r--library/core/src/ops/function.rs12
-rw-r--r--library/core/src/panic.rs4
-rw-r--r--library/core/src/panicking.rs3
-rw-r--r--library/core/src/pin.rs3
9 files changed, 17 insertions, 26 deletions
diff --git a/library/core/src/iter/sources/from_coroutine.rs b/library/core/src/iter/sources/from_coroutine.rs
index 16fbca9b65e..bf413b24d41 100644
--- a/library/core/src/iter/sources/from_coroutine.rs
+++ b/library/core/src/iter/sources/from_coroutine.rs
@@ -11,8 +11,7 @@ use crate::pin::Pin;
 /// # Examples
 ///
 /// ```
-/// #![cfg_attr(bootstrap, feature(generators))]
-/// #![cfg_attr(not(bootstrap), feature(coroutines))]
+/// #![feature(coroutines)]
 /// #![feature(iter_from_coroutine)]
 ///
 /// let it = std::iter::from_coroutine(|| {
diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs
index 6adea444214..8e2c887a161 100644
--- a/library/core/src/iter/traits/iterator.rs
+++ b/library/core/src/iter/traits/iterator.rs
@@ -69,7 +69,7 @@ fn _assert_is_object_safe(_: &dyn Iterator<Item = ()>) {}
     message = "`{Self}` is not an iterator"
 )]
 #[doc(notable_trait)]
-#[cfg_attr(not(bootstrap), lang = "iterator")]
+#[lang = "iterator"]
 #[rustc_diagnostic_item = "Iterator"]
 #[must_use = "iterators are lazy and do nothing unless consumed"]
 pub trait Iterator {
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index 5a6d242a729..4c6d5df389c 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -69,7 +69,7 @@
     test(no_crate_inject, attr(deny(warnings))),
     test(attr(allow(dead_code, deprecated, unused_variables, unused_mut)))
 )]
-#![cfg_attr(not(bootstrap), doc(rust_logo))]
+#![doc(rust_logo)]
 #![doc(cfg_hide(
     not(test),
     any(not(feature = "miri-test-libstd"), test, doctest),
diff --git a/library/core/src/mem/mod.rs b/library/core/src/mem/mod.rs
index 34534ba3b43..b810318fe7d 100644
--- a/library/core/src/mem/mod.rs
+++ b/library/core/src/mem/mod.rs
@@ -1358,7 +1358,7 @@ impl<T> SizedTypeProperties for T {}
 ///
 /// ```
 /// #![feature(offset_of)]
-/// # #![cfg_attr(not(bootstrap), feature(offset_of_enum))]
+/// # #![feature(offset_of_enum)]
 ///
 /// use std::mem;
 /// #[repr(C)]
@@ -1388,12 +1388,9 @@ impl<T> SizedTypeProperties for T {}
 ///     B { one: u8, two: u16 },
 /// }
 ///
-/// # #[cfg(not(bootstrap))]
 /// assert_eq!(mem::offset_of!(Enum, A.0), 1);
-/// # #[cfg(not(bootstrap))]
 /// assert_eq!(mem::offset_of!(Enum, B.two), 2);
 ///
-/// # #[cfg(not(bootstrap))]
 /// assert_eq!(mem::offset_of!(Option<&u8>, Some.0), 0);
 /// ```
 #[unstable(feature = "offset_of", issue = "106655")]
diff --git a/library/core/src/ops/coroutine.rs b/library/core/src/ops/coroutine.rs
index cd5ca988f7e..80e2903992e 100644
--- a/library/core/src/ops/coroutine.rs
+++ b/library/core/src/ops/coroutine.rs
@@ -7,8 +7,7 @@ use crate::pin::Pin;
 /// possible return values of a coroutine. Currently this corresponds to either
 /// a suspension point (`Yielded`) or a termination point (`Complete`).
 #[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
-#[cfg_attr(bootstrap, lang = "generator_state")]
-#[cfg_attr(not(bootstrap), lang = "coroutine_state")]
+#[lang = "coroutine_state"]
 #[unstable(feature = "coroutine_trait", issue = "43122")]
 pub enum CoroutineState<Y, R> {
     /// The coroutine suspended with a value.
@@ -40,8 +39,7 @@ pub enum CoroutineState<Y, R> {
 /// closure-like:
 ///
 /// ```rust
-/// #![cfg_attr(bootstrap, feature(generators))]
-/// #![cfg_attr(not(bootstrap), feature(coroutines))]
+/// #![feature(coroutines)]
 /// #![feature(coroutine_trait)]
 ///
 /// use std::ops::{Coroutine, CoroutineState};
@@ -68,8 +66,7 @@ pub enum CoroutineState<Y, R> {
 ///
 /// [RFC 2033]: https://github.com/rust-lang/rfcs/pull/2033
 /// [unstable book]: ../../unstable-book/language-features/coroutines.html
-#[cfg_attr(bootstrap, lang = "generator")]
-#[cfg_attr(not(bootstrap), lang = "coroutine")]
+#[lang = "coroutine"]
 #[unstable(feature = "coroutine_trait", issue = "43122")]
 #[fundamental]
 pub trait Coroutine<R = ()> {
diff --git a/library/core/src/ops/function.rs b/library/core/src/ops/function.rs
index 51e304dd7c2..3a3d3fcf1da 100644
--- a/library/core/src/ops/function.rs
+++ b/library/core/src/ops/function.rs
@@ -56,7 +56,7 @@ use crate::marker::Tuple;
 #[lang = "fn"]
 #[stable(feature = "rust1", since = "1.0.0")]
 #[rustc_paren_sugar]
-#[cfg_attr(not(bootstrap), rustc_on_unimplemented(
+#[rustc_on_unimplemented(
     on(
         Args = "()",
         note = "wrap the `{Self}` in a closure with no arguments: `|| {{ /* code */ }}`"
@@ -69,7 +69,7 @@ use crate::marker::Tuple;
     ),
     message = "expected a `{Trait}` closure, found `{Self}`",
     label = "expected an `{Trait}` closure, found `{Self}`"
-))]
+)]
 #[fundamental] // so that regex can rely that `&str: !FnMut`
 #[must_use = "closures are lazy and do nothing unless called"]
 // FIXME(effects) #[const_trait]
@@ -143,7 +143,7 @@ pub trait Fn<Args: Tuple>: FnMut<Args> {
 #[lang = "fn_mut"]
 #[stable(feature = "rust1", since = "1.0.0")]
 #[rustc_paren_sugar]
-#[cfg_attr(not(bootstrap), rustc_on_unimplemented(
+#[rustc_on_unimplemented(
     on(
         Args = "()",
         note = "wrap the `{Self}` in a closure with no arguments: `|| {{ /* code */ }}`"
@@ -156,7 +156,7 @@ pub trait Fn<Args: Tuple>: FnMut<Args> {
     ),
     message = "expected a `{Trait}` closure, found `{Self}`",
     label = "expected an `{Trait}` closure, found `{Self}`"
-))]
+)]
 #[fundamental] // so that regex can rely that `&str: !FnMut`
 #[must_use = "closures are lazy and do nothing unless called"]
 // FIXME(effects) #[const_trait]
@@ -222,7 +222,7 @@ pub trait FnMut<Args: Tuple>: FnOnce<Args> {
 #[lang = "fn_once"]
 #[stable(feature = "rust1", since = "1.0.0")]
 #[rustc_paren_sugar]
-#[cfg_attr(not(bootstrap), rustc_on_unimplemented(
+#[rustc_on_unimplemented(
     on(
         Args = "()",
         note = "wrap the `{Self}` in a closure with no arguments: `|| {{ /* code */ }}`"
@@ -235,7 +235,7 @@ pub trait FnMut<Args: Tuple>: FnOnce<Args> {
     ),
     message = "expected a `{Trait}` closure, found `{Self}`",
     label = "expected an `{Trait}` closure, found `{Self}`"
-))]
+)]
 #[fundamental] // so that regex can rely that `&str: !FnMut`
 #[must_use = "closures are lazy and do nothing unless called"]
 // FIXME(effects) #[const_trait]
diff --git a/library/core/src/panic.rs b/library/core/src/panic.rs
index a00fd322b3c..b7cd10b5b19 100644
--- a/library/core/src/panic.rs
+++ b/library/core/src/panic.rs
@@ -47,7 +47,7 @@ pub macro panic_2015 {
 #[allow_internal_unstable(core_panic, const_format_args)]
 #[rustc_diagnostic_item = "core_panic_2021_macro"]
 #[rustc_macro_transparency = "semitransparent"]
-#[cfg(any(bootstrap, feature = "panic_immediate_abort"))]
+#[cfg(feature = "panic_immediate_abort")]
 pub macro panic_2021 {
     () => (
         $crate::panicking::panic("explicit panic")
@@ -75,7 +75,7 @@ pub macro panic_2021 {
 )]
 #[rustc_diagnostic_item = "core_panic_2021_macro"]
 #[rustc_macro_transparency = "semitransparent"]
-#[cfg(not(any(bootstrap, feature = "panic_immediate_abort")))]
+#[cfg(not(feature = "panic_immediate_abort"))]
 pub macro panic_2021 {
     () => ({
         // Create a function so that the argument for `track_caller`
diff --git a/library/core/src/panicking.rs b/library/core/src/panicking.rs
index 39a5e8d9fe2..fa6e5fe5d17 100644
--- a/library/core/src/panicking.rs
+++ b/library/core/src/panicking.rs
@@ -170,9 +170,8 @@ pub fn unreachable_display<T: fmt::Display>(x: &T) -> ! {
 #[inline]
 #[track_caller]
 #[rustc_do_not_const_check] // hooked by const-eval
-#[cfg_attr(bootstrap, lang = "panic_display")]
 // enforce a &&str argument in const-check and hook this by const-eval
-#[cfg_attr(not(bootstrap), rustc_const_panic_str)]
+#[rustc_const_panic_str]
 #[rustc_const_unstable(feature = "core_panic", issue = "none")]
 pub const fn panic_display<T: fmt::Display>(x: &T) -> ! {
     panic_fmt(format_args!("{}", *x));
diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs
index bca97d4ee36..c3e774e1dab 100644
--- a/library/core/src/pin.rs
+++ b/library/core/src/pin.rs
@@ -1088,8 +1088,7 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
 /// ### With `Coroutine`s
 ///
 /// ```rust
-/// #![cfg_attr(bootstrap, feature(generators))]
-/// #![cfg_attr(not(bootstrap), feature(coroutines))]
+/// #![feature(coroutines)]
 /// #![feature(coroutine_trait)]
 /// use core::{
 ///     ops::{Coroutine, CoroutineState},