Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax orderings of Serialize impl for atomic types to match the latest stable #2263

merged 1 commit into from Aug 21, 2022


Copy link

@taiki-e taiki-e commented Aug 20, 2022

The standard library changed orderings of Debug impl for atomic types from SeqCst to Relaxed in Rust 1.63 (latest stable): rust-lang/rust#97026

This PR relaxes the orderings of Serialize impl for atomic types to match the latest stable.

// Matches the atomic ordering used in libcore for the Debug impl

Copy link

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


@dtolnay dtolnay merged commit 6660676 into serde-rs:master Aug 21, 2022
21 checks passed
@taiki-e taiki-e deleted the ordering branch August 21, 2022 03:24
Copy link

Mingun commented Aug 21, 2022

Shouldn't this be dependent on the current rust version?

Copy link

71 commented Aug 21, 2022

@Mingun My understanding is that the reasoning for the change also applies here, ie. this change does not intend to replicate how Debug behaves, but rather applies the reasoning that Debug can use relaxed ordering to Serialize, since Debug and Serialize behave similarly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants