]> git.lizzy.rs Git - rust.git/commitdiff
Stabilize cfg_target_has_atomic
authorAmanieu d'Antras <amanieu@gmail.com>
Wed, 9 Feb 2022 18:14:35 +0000 (18:14 +0000)
committerAmanieu d'Antras <amanieu@gmail.com>
Wed, 9 Feb 2022 18:45:44 +0000 (18:45 +0000)
Closes #32976

13 files changed:
compiler/rustc_feature/src/accepted.rs
compiler/rustc_feature/src/active.rs
compiler/rustc_feature/src/builtin_attrs.rs
compiler/rustc_span/src/symbol.rs
library/alloc/src/lib.rs
library/core/src/lib.rs
library/core/tests/lib.rs
library/std/src/lib.rs
src/test/run-make-fulldeps/atomic-lock-free/atomic_lock_free.rs
src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic-equal-alignment.rs [new file with mode: 0644]
src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic-equal-alignment.stderr [new file with mode: 0644]
src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.rs [deleted file]
src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.stderr [deleted file]

index 32a9d081ed8c592a610d5eba448cf02915a15d86..88edaec916972f70b564b8b6c53b393fa8770fb3 100644 (file)
@@ -72,6 +72,8 @@ macro_rules! declare_features {
     (accepted, cfg_doctest, "1.40.0", Some(62210), None),
     /// Allows `cfg(target_feature = "...")`.
     (accepted, cfg_target_feature, "1.27.0", Some(29717), None),
+    /// Allows `cfg(target_has_atomic = "...")`.
+    (accepted, cfg_target_has_atomic, "1.60.0", Some(32976), None),
     /// Allows `cfg(target_vendor = "...")`.
     (accepted, cfg_target_vendor, "1.33.0", Some(29718), None),
     /// Allows implementing `Clone` for closures where possible (RFC 2132).
index e5232bf3dd0193a2789d7a58aa605644d594b127..71b9419bab512705102b0560ff29f5559876f768 100644 (file)
@@ -309,8 +309,8 @@ pub fn set(&self, features: &mut Features, span: Span) {
     (active, cfg_sanitize, "1.41.0", Some(39699), None),
     /// Allows `cfg(target_abi = "...")`.
     (active, cfg_target_abi, "1.55.0", Some(80970), None),
-    /// Allows `cfg(target_has_atomic = "...")`.
-    (active, cfg_target_has_atomic, "1.9.0", Some(32976), None),
+    /// Allows `cfg(target_has_atomic_equal_alignment = "...")`.
+    (active, cfg_target_has_atomic_equal_alignment, "1.60.0", Some(93822), None),
     /// Allows `cfg(target_thread_local)`.
     (active, cfg_target_thread_local, "1.7.0", Some(29594), None),
     /// Allow conditional compilation depending on rust version
index cb2562d09a5250e5c39c1ddf2944927c891e05bc..7ebef8e19ad2241e629fd1ed7eece4b699d43c33 100644 (file)
@@ -26,12 +26,10 @@ macro_rules! cfg_fn {
     // (name in cfg, feature, function to check if the feature is enabled)
     (sym::target_abi, sym::cfg_target_abi, cfg_fn!(cfg_target_abi)),
     (sym::target_thread_local, sym::cfg_target_thread_local, cfg_fn!(cfg_target_thread_local)),
-    (sym::target_has_atomic, sym::cfg_target_has_atomic, cfg_fn!(cfg_target_has_atomic)),
-    (sym::target_has_atomic_load_store, sym::cfg_target_has_atomic, cfg_fn!(cfg_target_has_atomic)),
     (
         sym::target_has_atomic_equal_alignment,
-        sym::cfg_target_has_atomic,
-        cfg_fn!(cfg_target_has_atomic),
+        sym::cfg_target_has_atomic_equal_alignment,
+        cfg_fn!(cfg_target_has_atomic_equal_alignment),
     ),
     (sym::sanitize, sym::cfg_sanitize, cfg_fn!(cfg_sanitize)),
     (sym::version, sym::cfg_version, cfg_fn!(cfg_version)),
index 70fad4911f9c760e7ae46e027062bd8c874dcfde..95f6e19e5910f4ea61a4ad0af76d4d17b74dfeef 100644 (file)
         cfg_target_abi,
         cfg_target_feature,
         cfg_target_has_atomic,
+        cfg_target_has_atomic_equal_alignment,
         cfg_target_thread_local,
         cfg_target_vendor,
         cfg_version,
index a07071cb6fba35e87a74beaac0520329eb6050c7..ab9f0b9d7378fbceca09ab6adb372f35698e07b0 100644 (file)
 #![feature(associated_type_bounds)]
 #![feature(box_syntax)]
 #![feature(cfg_sanitize)]
-#![feature(cfg_target_has_atomic)]
+#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
 #![feature(const_deref)]
 #![feature(const_fn_trait_bound)]
 #![feature(const_mut_refs)]
index e52d52e954c8fff08f335a4d20ce309c6510d312..72d8e1b39030a13e41105b44cc6e5f96362f6aa4 100644 (file)
 #![feature(allow_internal_unstable)]
 #![feature(associated_type_bounds)]
 #![feature(auto_traits)]
-#![feature(cfg_target_has_atomic)]
+#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
+#![cfg_attr(not(bootstrap), feature(cfg_target_has_atomic_equal_alignment))]
 #![feature(const_fn_floating_point_arithmetic)]
 #![feature(const_fn_fn_ptr_basics)]
 #![feature(const_fn_trait_bound)]
index a993def0a818ef98375d4a65ff1a7ee65b7f6a3b..1c512471c95cbff0d5878ec797437d230100cc00 100644 (file)
@@ -7,7 +7,7 @@
 #![feature(box_syntax)]
 #![feature(cell_update)]
 #![feature(cfg_panic)]
-#![feature(cfg_target_has_atomic)]
+#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
 #![feature(const_assume)]
 #![feature(const_black_box)]
 #![feature(const_bool_to_option)]
index 4f44a3183a6eca0263c7e8de6948854b60e28551..2aae29f21544da6be1979cb452149ca1313ab232 100644 (file)
 #![feature(c_variadic)]
 #![feature(cfg_accessible)]
 #![feature(cfg_eval)]
-#![feature(cfg_target_has_atomic)]
+#![cfg_attr(bootstrap, feature(cfg_target_has_atomic))]
 #![feature(cfg_target_thread_local)]
 #![feature(char_error_internals)]
 #![feature(char_internals)]
index bc7951a04da86d7dcf338bd5d736935415719d8c..e9b28504a907a4c5fa02769f49ab0d15180b89e9 100644 (file)
@@ -1,4 +1,4 @@
-#![feature(cfg_target_has_atomic, no_core, intrinsics, lang_items)]
+#![feature(no_core, intrinsics, lang_items)]
 #![crate_type="rlib"]
 #![no_core]
 
diff --git a/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic-equal-alignment.rs b/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic-equal-alignment.rs
new file mode 100644 (file)
index 0000000..3d692a0
--- /dev/null
@@ -0,0 +1,14 @@
+fn main() {
+    cfg!(target_has_atomic_equal_alignment = "8");
+    //~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
+    cfg!(target_has_atomic_equal_alignment = "16");
+    //~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
+    cfg!(target_has_atomic_equal_alignment = "32");
+    //~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
+    cfg!(target_has_atomic_equal_alignment = "64");
+    //~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
+    cfg!(target_has_atomic_equal_alignment = "128");
+    //~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
+    cfg!(target_has_atomic_equal_alignment = "ptr");
+    //~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
+}
diff --git a/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic-equal-alignment.stderr b/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic-equal-alignment.stderr
new file mode 100644 (file)
index 0000000..8ad3b03
--- /dev/null
@@ -0,0 +1,57 @@
+error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
+  --> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:2:10
+   |
+LL |     cfg!(target_has_atomic_equal_alignment = "8");
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #93822 <https://github.com/rust-lang/rust/issues/93822> for more information
+   = help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable
+
+error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
+  --> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:4:10
+   |
+LL |     cfg!(target_has_atomic_equal_alignment = "16");
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #93822 <https://github.com/rust-lang/rust/issues/93822> for more information
+   = help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable
+
+error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
+  --> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:6:10
+   |
+LL |     cfg!(target_has_atomic_equal_alignment = "32");
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #93822 <https://github.com/rust-lang/rust/issues/93822> for more information
+   = help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable
+
+error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
+  --> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:8:10
+   |
+LL |     cfg!(target_has_atomic_equal_alignment = "64");
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #93822 <https://github.com/rust-lang/rust/issues/93822> for more information
+   = help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable
+
+error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
+  --> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:10:10
+   |
+LL |     cfg!(target_has_atomic_equal_alignment = "128");
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #93822 <https://github.com/rust-lang/rust/issues/93822> for more information
+   = help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable
+
+error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
+  --> $DIR/feature-gate-cfg-target-has-atomic-equal-alignment.rs:12:10
+   |
+LL |     cfg!(target_has_atomic_equal_alignment = "ptr");
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #93822 <https://github.com/rust-lang/rust/issues/93822> for more information
+   = help: add `#![feature(cfg_target_has_atomic_equal_alignment)]` to the crate attributes to enable
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.rs b/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.rs
deleted file mode 100644 (file)
index 049fdd8..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-#![feature(intrinsics, lang_items, no_core, rustc_attrs)]
-
-#![crate_type="rlib"]
-#![no_core]
-
-extern "rust-intrinsic" {
-    fn atomic_xadd<T>(dst: *mut T, src: T) -> T;
-}
-
-#[lang = "sized"]
-trait Sized {}
-#[lang = "copy"]
-trait Copy {}
-
-#[cfg(target_has_atomic = "8")]
-//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-pub unsafe fn atomic_u8(x: *mut u8) {
-    atomic_xadd(x, 1);
-    atomic_xadd(x, 1);
-}
-#[cfg(target_has_atomic = "8")]
-//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-pub unsafe fn atomic_i8(x: *mut i8) {
-    atomic_xadd(x, 1);
-}
-#[cfg(target_has_atomic = "16")]
-//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-pub unsafe fn atomic_u16(x: *mut u16) {
-    atomic_xadd(x, 1);
-}
-#[cfg(target_has_atomic = "16")]
-//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-pub unsafe fn atomic_i16(x: *mut i16) {
-    atomic_xadd(x, 1);
-}
-#[cfg(target_has_atomic = "32")]
-//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-pub unsafe fn atomic_u32(x: *mut u32) {
-    atomic_xadd(x, 1);
-}
-#[cfg(target_has_atomic = "32")]
-//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-pub unsafe fn atomic_i32(x: *mut i32) {
-    atomic_xadd(x, 1);
-}
-#[cfg(target_has_atomic = "64")]
-//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-pub unsafe fn atomic_u64(x: *mut u64) {
-    atomic_xadd(x, 1);
-}
-#[cfg(target_has_atomic = "64")]
-//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-pub unsafe fn atomic_i64(x: *mut i64) {
-    atomic_xadd(x, 1);
-}
-#[cfg(target_has_atomic = "128")]
-//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-pub unsafe fn atomic_u128(x: *mut u128) {
-    atomic_xadd(x, 1);
-}
-#[cfg(target_has_atomic = "128")]
-//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-pub unsafe fn atomic_i128(x: *mut i128) {
-    atomic_xadd(x, 1);
-}
-#[cfg(target_has_atomic = "ptr")]
-//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-pub unsafe fn atomic_usize(x: *mut usize) {
-    atomic_xadd(x, 1);
-}
-#[cfg(target_has_atomic = "ptr")]
-//~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-pub unsafe fn atomic_isize(x: *mut isize) {
-    atomic_xadd(x, 1);
-}
-
-fn main() {
-    cfg!(target_has_atomic = "8");
-    //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-    cfg!(target_has_atomic = "16");
-    //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-    cfg!(target_has_atomic = "32");
-    //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-    cfg!(target_has_atomic = "64");
-    //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-    cfg!(target_has_atomic = "128");
-    //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-    cfg!(target_has_atomic = "ptr");
-    //~^ ERROR `cfg(target_has_atomic)` is experimental and subject to change
-    cfg!(target_has_atomic_load_store = "8");
-    //~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
-    cfg!(target_has_atomic_load_store = "16");
-    //~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
-    cfg!(target_has_atomic_load_store = "32");
-    //~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
-    cfg!(target_has_atomic_load_store = "64");
-    //~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
-    cfg!(target_has_atomic_load_store = "128");
-    //~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
-    cfg!(target_has_atomic_load_store = "ptr");
-    //~^ ERROR `cfg(target_has_atomic_load_store)` is experimental and subject to change
-    cfg!(target_has_atomic_equal_alignment = "8");
-    //~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
-    cfg!(target_has_atomic_equal_alignment = "16");
-    //~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
-    cfg!(target_has_atomic_equal_alignment = "32");
-    //~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
-    cfg!(target_has_atomic_equal_alignment = "64");
-    //~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
-    cfg!(target_has_atomic_equal_alignment = "128");
-    //~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
-    cfg!(target_has_atomic_equal_alignment = "ptr");
-    //~^ ERROR `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
-}
-
-#[macro_export]
-#[rustc_builtin_macro]
-macro_rules! cfg { () => () }
diff --git a/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.stderr b/src/test/ui/feature-gates/feature-gate-cfg-target-has-atomic.stderr
deleted file mode 100644 (file)
index 16e1dc6..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:15:7
-   |
-LL | #[cfg(target_has_atomic = "8")]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:21:7
-   |
-LL | #[cfg(target_has_atomic = "8")]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:26:7
-   |
-LL | #[cfg(target_has_atomic = "16")]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:31:7
-   |
-LL | #[cfg(target_has_atomic = "16")]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:36:7
-   |
-LL | #[cfg(target_has_atomic = "32")]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:41:7
-   |
-LL | #[cfg(target_has_atomic = "32")]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:46:7
-   |
-LL | #[cfg(target_has_atomic = "64")]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:51:7
-   |
-LL | #[cfg(target_has_atomic = "64")]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:56:7
-   |
-LL | #[cfg(target_has_atomic = "128")]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:61:7
-   |
-LL | #[cfg(target_has_atomic = "128")]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:66:7
-   |
-LL | #[cfg(target_has_atomic = "ptr")]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:71:7
-   |
-LL | #[cfg(target_has_atomic = "ptr")]
-   |       ^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:78:10
-   |
-LL |     cfg!(target_has_atomic = "8");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:80:10
-   |
-LL |     cfg!(target_has_atomic = "16");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:82:10
-   |
-LL |     cfg!(target_has_atomic = "32");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:84:10
-   |
-LL |     cfg!(target_has_atomic = "64");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:86:10
-   |
-LL |     cfg!(target_has_atomic = "128");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:88:10
-   |
-LL |     cfg!(target_has_atomic = "ptr");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:90:10
-   |
-LL |     cfg!(target_has_atomic_load_store = "8");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:92:10
-   |
-LL |     cfg!(target_has_atomic_load_store = "16");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:94:10
-   |
-LL |     cfg!(target_has_atomic_load_store = "32");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:96:10
-   |
-LL |     cfg!(target_has_atomic_load_store = "64");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:98:10
-   |
-LL |     cfg!(target_has_atomic_load_store = "128");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic_load_store)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:100:10
-   |
-LL |     cfg!(target_has_atomic_load_store = "ptr");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:102:10
-   |
-LL |     cfg!(target_has_atomic_equal_alignment = "8");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:104:10
-   |
-LL |     cfg!(target_has_atomic_equal_alignment = "16");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:106:10
-   |
-LL |     cfg!(target_has_atomic_equal_alignment = "32");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:108:10
-   |
-LL |     cfg!(target_has_atomic_equal_alignment = "64");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:110:10
-   |
-LL |     cfg!(target_has_atomic_equal_alignment = "128");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error[E0658]: `cfg(target_has_atomic_equal_alignment)` is experimental and subject to change
-  --> $DIR/feature-gate-cfg-target-has-atomic.rs:112:10
-   |
-LL |     cfg!(target_has_atomic_equal_alignment = "ptr");
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #32976 <https://github.com/rust-lang/rust/issues/32976> for more information
-   = help: add `#![feature(cfg_target_has_atomic)]` to the crate attributes to enable
-
-error: aborting due to 30 previous errors
-
-For more information about this error, try `rustc --explain E0658`.