Skip to content

Commit 5aac94a

Browse files
committed
Don't import atomics unless supported by the platform
1 parent 602dd14 commit 5aac94a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

library/core/src/intrinsics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ use crate::mem;
5959

6060
// These imports are used for simplifying intra-doc links
6161
#[allow(unused_imports)]
62+
#[cfg(all(target_has_atomic = "8", target_has_atomic = "32", target_has_atomic = "ptr"))]
6263
use crate::sync::atomic::{self, AtomicBool, AtomicI32, AtomicIsize, AtomicU32, Ordering};
6364

6465
#[stable(feature = "drop_in_place", since = "1.8.0")]

0 commit comments

Comments
 (0)