Skip to content

PartialOrd documentation mixes functions and operators #87485

Closed
@ChrisJefferson

Description

@ChrisJefferson

The documentation for PartialOrd: https://doc.rust-lang.org/core/cmp/trait.PartialOrd.html

Tells me to implement functions partial_ord, and (possibly) lt, le, gt, ge. The documentation immediately starts talking about the Rust < and > operators, without ever saying how those operators relate to the functions in the trait. There also aren't any requirements put on le and ge (I'm not sure of the most compact and efficient way of listing the requirements on these operators. Is just saying "a <= b is true if and only if a<b or a==b is true" sufficient?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions