-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[refactoring] Fix more instances of non-canonical PartialOrd implementations #11475
[refactoring] Fix more instances of non-canonical PartialOrd implementations #11475
Conversation
pub struct FunctionDef { | ||
name: Symbol, | ||
start: Position, | ||
attrs: Vec<String>, | ||
#[derivative(PartialEq = "ignore")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementations PartialEq
, PartialOrd
, and Ord
should agree with each other: https://docs.rs/rust-libcore/latest/core/cmp/trait.PartialOrd.html#how-can-i-implement-partialord
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #11475 +/- ##
=========================================
- Coverage 69.0% 69.0% -0.1%
=========================================
Files 768 768
Lines 178809 178804 -5
=========================================
- Hits 123428 123397 -31
- Misses 55381 55407 +26 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this!
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Description
The recent upgrade to Rust 1.74.1 (#11374) added new clippy checks.
One such check was adhering to this rule: https://rust-lang.github.io/rust-clippy/master/index.html#/non_canonical_partial_ord_impl
I have addressed most of the instances in our codebase that violated this rule, and fixed a bug found while doing so (
PartialOrd
,PartialEq
, andOrd
always need to agree with each other).The only cases currently left in our codebase are because of the use of the external
derivative
crate (basically, due to this issue: mcarton/rust-derivative#115). It looks like thederivative
crate may no longer be maintained, so we may want to look for alternatives (not done in this PR).Test Plan
Existing tests.