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/cmp.rs2
-rw-r--r--library/core/src/lib.rs2
-rw-r--r--library/core/src/macros/mod.rs6
3 files changed, 6 insertions, 4 deletions
diff --git a/library/core/src/cmp.rs b/library/core/src/cmp.rs
index 5a3b9365cd2..66a6578fc72 100644
--- a/library/core/src/cmp.rs
+++ b/library/core/src/cmp.rs
@@ -348,7 +348,7 @@ pub trait Eq: PartialEq<Self> {
 #[rustc_builtin_macro]
 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
 #[allow_internal_unstable(core_intrinsics, derive_eq, structural_match)]
-#[allow_internal_unstable(coverage_attribute)]
+#[cfg_attr(bootstrap, allow_internal_unstable(coverage_attribute))]
 pub macro Eq($item:item) {
     /* compiler built-in */
 }
diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs
index d45cb01910f..922866f95dc 100644
--- a/library/core/src/lib.rs
+++ b/library/core/src/lib.rs
@@ -107,12 +107,12 @@
 //
 // Library features:
 // tidy-alphabetical-start
+#![cfg_attr(bootstrap, feature(coverage_attribute))]
 #![feature(array_ptr_get)]
 #![feature(asm_experimental_arch)]
 #![feature(const_eval_select)]
 #![feature(const_typed_swap)]
 #![feature(core_intrinsics)]
-#![feature(coverage_attribute)]
 #![feature(do_not_recommend)]
 #![feature(internal_impls_macro)]
 #![feature(ip)]
diff --git a/library/core/src/macros/mod.rs b/library/core/src/macros/mod.rs
index ab674b58902..bff7ad98df3 100644
--- a/library/core/src/macros/mod.rs
+++ b/library/core/src/macros/mod.rs
@@ -1673,7 +1673,8 @@ pub(crate) mod builtin {
     ///
     /// [the reference]: ../../../reference/attributes/testing.html#the-test-attribute
     #[stable(feature = "rust1", since = "1.0.0")]
-    #[allow_internal_unstable(test, rustc_attrs, coverage_attribute)]
+    #[allow_internal_unstable(test, rustc_attrs)]
+    #[cfg_attr(bootstrap, allow_internal_unstable(coverage_attribute))]
     #[rustc_builtin_macro]
     pub macro test($item:item) {
         /* compiler built-in */
@@ -1686,7 +1687,8 @@ pub(crate) mod builtin {
         soft,
         reason = "`bench` is a part of custom test frameworks which are unstable"
     )]
-    #[allow_internal_unstable(test, rustc_attrs, coverage_attribute)]
+    #[allow_internal_unstable(test, rustc_attrs)]
+    #[cfg_attr(bootstrap, allow_internal_unstable(coverage_attribute))]
     #[rustc_builtin_macro]
     pub macro bench($item:item) {
         /* compiler built-in */