diff --git a/src/lib.rs b/src/lib.rs index 85efd1f..d54cee5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -446,7 +446,10 @@ impl fmt::Display for PushError { /// Equivalent to `atomic::fence(Ordering::SeqCst)`, but in some cases faster. #[inline] fn full_fence() { - if cfg!(any(target_arch = "x86", target_arch = "x86_64")) { + if cfg!(all( + any(target_arch = "x86", target_arch = "x86_64"), + not(miri) + )) { // HACK(stjepang): On x86 architectures there are two different ways of executing // a `SeqCst` fence. //