Don't import atomics unless supported by the platform

This commit is contained in:
Joshua Nelson 2020-08-23 23:11:47 -04:00
parent 602dd145a3
commit 5aac94a1f6

View file

@ -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")]