diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs index ac3ce2255c89b..2d6a3917c764e 100644 --- a/src/liballoc/sync.rs +++ b/src/liballoc/sync.rs @@ -419,8 +419,7 @@ impl Arc { #[inline] #[stable(feature = "arc_unique", since = "1.4.0")] pub fn try_unwrap(this: Self) -> Result { - // See `drop` for why all these atomics are like this - if this.inner().strong.compare_exchange(1, 0, Release, Relaxed).is_err() { + if this.inner().strong.compare_exchange(1, 0, Relaxed, Relaxed).is_err() { return Err(this); }