Skip to content

Commit

Permalink
Do not use x86 specific fence on Miri
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jul 20, 2022
1 parent bc4f426 commit d61005f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,10 @@ impl<T> fmt::Display for PushError<T> {
/// 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.
//
Expand Down

0 comments on commit d61005f

Please sign in to comment.