Split and deprecate and_or - #24276
Open
Nagato-Yuzuru wants to merge 7 commits into
Open
Conversation
API change: `SortProperties::and_or` is deprecated.
Contributor
Author
|
I'm not sure if the patch will into version 55.0. It looks like it's about to be released. I'd be happy to update the deprecation description and add breaking change documentation. |
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #24276 +/- ##
==========================================
+ Coverage 81.05% 81.30% +0.25%
==========================================
Files 1106 1110 +4
Lines 382287 385497 +3210
Branches 382287 385497 +3210
==========================================
+ Hits 309851 313438 +3587
+ Misses 54121 53582 -539
- Partials 18315 18477 +162 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Which issue does this PR close?
Stacked on #24206: I will rebase once merges after it merged.
Rationale for this change
Under Kleene logic, the behavior of
andandoris inconsistent with respect to transitivity of ordered.See #24208 for the counterexamples and the full rules.
What changes are included in this PR?
SortProperties::and_orintoand/or.BinaryExpr::get_propertiesnow calls the matching method per operator.and_orand narrow it to whatandandoragree on (Singleton/Singleton→Singleton, everything elseUnordered). A caller ofand_ordoes not say which operator it means, so any stronger claim is wrong for one of them. The previous behavior is this bug.Are these changes tested?
Yes
Are there any user-facing changes?
Yes. Split and deprecate
and_or