Skip to content

Commit

Permalink
Rollup merge of rust-lang#129003 - Voultapher:improve-ord-docs, r=wor…
Browse files Browse the repository at this point in the history
…kingjubilee

Improve Ord docs

- Makes wording more clear and re-structures some sections that can be overwhelming for someone not already in the know.
- Adds examples of how *not* to implement Ord, inspired by various anti-patterns found in real world code.

Many of the wording changes are inspired directly by my personal experience of being confused by the `Ord` docs and seeing other people get it wrong as well, especially lately having looked at a number of `Ord` implementations as part of rust-lang#128899.

Created with help by `@orlp.`

r​? `@workingjubilee`
  • Loading branch information
matthiaskrgr authored Sep 29, 2024
2 parents 07542a5 + 08ac3a0 commit 109f270
Showing 1 changed file with 257 additions and 99 deletions.
Loading

0 comments on commit 109f270

Please # to comment.