-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Optimization for bool's PartialOrd impl #80034
Copy link
Copy link
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
#66780 suggested an optimization for
impl Ord for bool, and it was implemented in #66881.However, for some reason,
impl PartialOrd for boolwas not optimized the same way:rust/library/core/src/cmp.rs
Lines 1286 to 1300 in 1f7762b
rust/library/core/src/cmp.rs
Lines 1236 to 1241 in 1f7762b
It can be implemented in terms of
Ord:Is this deliberate or just something that no-one noticed?