rust/compiler/rustc_builtin_macros
Tomasz Miąsko e4efccd4a6 Fix derived PartialOrd operators
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.
2021-02-09 08:15:37 +01:00
..
src Fix derived PartialOrd operators 2021-02-09 08:15:37 +01:00
Cargo.toml expand/resolve: Turn #[derive] into a regular macro attribute 2021-02-07 20:08:45 +03:00