Skip to content

Commit

Permalink
Rollup merge of rust-lang#61223 - czipperz:tuple-ord-document-orderin…
Browse files Browse the repository at this point in the history
…g, r=oli-obk

Document tuple's Ord behavior as sequential

Partially closing rust-lang#50727
  • Loading branch information
Centril committed Jun 7, 2019
2 parents d132f54 + 0fd9934 commit 0e838dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libstd/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,10 @@ mod prim_str { }
/// assert_eq!(tuple.2, 'c');
/// ```
///
/// The sequential nature of the tuple applies to its implementations of various
/// traits. For example, in `PartialOrd` and `Ord`, the elements are compared
/// sequentially until the first non-equal set is found.
///
/// For more about tuples, see [the book](../book/ch03-02-data-types.html#the-tuple-type).
///
/// # Trait implementations
Expand Down

0 comments on commit 0e838dd

Please sign in to comment.