Improve memory ordering diagnostics#97389
Merged
bors merged 4 commits intorust-lang:masterfrom Jun 27, 2022
Merged
Conversation
Contributor
|
r? @nagisa (rust-highfive has picked a reviewer for you, use r? to override) |
Member
|
This is quite awesome and is something I encountered recently as well! Unfortunately don't have capacity to review rustc PRs right now. r? @estebank |
estebank
approved these changes
May 26, 2022
Contributor
estebank
left a comment
There was a problem hiding this comment.
Left a couple of nitpicks, but otherwise LGTM.
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
82b8e39 to
f107923
Compare
Member
Author
Collaborator
|
📌 Commit f107923 has been approved by |
Collaborator
|
🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened. |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 27, 2022
…askrgr Rollup of 5 pull requests Successful merges: - rust-lang#97389 (Improve memory ordering diagnostics) - rust-lang#97780 (Check ADT field is well-formed before checking it is sized) - rust-lang#98530 (compiletest: add issue number param to `known-bug`) - rust-lang#98556 (Fix builds on Windows (closes rust-lang#98546)) - rust-lang#98561 (Fix spelling in SAFETY comment) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before:
After:
Before this change, the compiler suggests the failure ordering is too strong and suggests choosing a weaker ordering. After this change, it instead suggests the success ordering is not strong enough, and suggests chosing a stronger one. This is more likely to be correct.
Also, before this change, the compiler suggested downgrading an invalid AcqRel failure ordering to Relaxed, without mentioning Acquire as an option.