Skip to content

Commit

Permalink
Rollup merge of rust-lang#127073 - Sky9x:unnecessary-seqcst, r=Nilstrieb
Browse files Browse the repository at this point in the history
Remove unnecessary SeqCst in `impl fmt::Pointer for AtomicPtr`

Unnecessarily strict ordering.
  • Loading branch information
GuillaumeGomez authored Jun 29, 2024
2 parents aaed209 + 48dc678 commit 1858bdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/sync/atomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3766,7 +3766,7 @@ impl<T> fmt::Debug for AtomicPtr<T> {
#[stable(feature = "atomic_pointer", since = "1.24.0")]
impl<T> fmt::Pointer for AtomicPtr<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Pointer::fmt(&self.load(Ordering::SeqCst), f)
fmt::Pointer::fmt(&self.load(Ordering::Relaxed), f)
}
}

Expand Down

0 comments on commit 1858bdc

Please sign in to comment.