IMO, Ord
is definitely a trait for weak orders. It's just incorrectly documented (it should say "total preorder", yet it does say "total order" im the docs). Look at Eq
which is correctly documented as a trait for equivalence relations, not for equality. The distinction between stable and unstable sorting algorithms only really makes sense for weak orders, too. (The German version of the Wikipedia article also does point that out.)
(The use of "total order" in the docs makes some sense if the equivalence by the Eq
implementation is (mis-)interpreted as equality. After all, a total preorder is the same as an actual total order on the equivalence classes.)