-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
No definition of lexicographic order in docs for Iterator::cmp* #72255
Copy link
Copy link
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
It seems that the comparison functions are not correctly implemented.
I tried this code:
I expected to see this happen:
The code above should panic. The reason is: 1 is NOT less than 1 and 1 is NOT greater than 1.
What I'm missing in Ordering are LessOrEqual and GreaterOrEqual. If these 2 objects would exist I could write:
which would correct not panic.
Meta
I've tried this in Rust Playground with stable and nightly.