mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
e4efccd4a6
The derived implementation of `partial_cmp` compares matching fields one by one, stopping the computation when the result of a comparison is not equal to `Some(Equal)`. On the other hand the derived implementation for `lt`, `le`, `gt` and `ge` continues the computation when the result of a field comparison is `None`, consequently those operators are not transitive and inconsistent with `partial_cmp`. Fix the inconsistency by using the default implementation that fall-backs to the `partial_cmp`. This also avoids creating very deeply nested closures that were quite costly to compile. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |