diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-08-23 23:11:47 -0400 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-08-23 23:11:47 -0400 |
| commit | 5aac94a1f616f3fce070cb9b21995712aef6cc0d (patch) | |
| tree | d886454817ca8399bb72ae0520811c52ba14a0e0 | |
| parent | 602dd145a3f0bdb85793e3d9ab05e6e56b2e567f (diff) | |
| download | rust-5aac94a1f616f3fce070cb9b21995712aef6cc0d.tar.gz rust-5aac94a1f616f3fce070cb9b21995712aef6cc0d.zip | |
Don't import atomics unless supported by the platform
| -rw-r--r-- | library/core/src/intrinsics.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 95edf463b83..25951e2f582 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -59,6 +59,7 @@ use crate::mem; // These imports are used for simplifying intra-doc links #[allow(unused_imports)] +#[cfg(all(target_has_atomic = "8", target_has_atomic = "32", target_has_atomic = "ptr"))] use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering}; #[stable(feature = "drop_in_place", since = "1.8.0")] |
