rust/library/core
Matthias Krüger 4ead6d9dc7
Rollup merge of #95017 - zachs18:cmp_ordering_derive_eq, r=Dylan-DPC
Derive Eq for std::cmp::Ordering, instead of using manual impl.

This allows consts of type Ordering to be used in patterns, and with feature(adt_const_params) allows using `Ordering` as a const generic parameter.

Currently, `std::cmp::Ordering` implements `Eq` using a manually written `impl Eq for Ordering {}`, instead of `derive(Eq)`. This means that it does not implement `StructuralEq`.

This commit removes the manually written impl, and adds `derive(Eq)` to `Ordering`, so that it will implement `StructuralEq`.
2022-03-18 21:50:48 +01:00
..
benches Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Rollup merge of #95017 - zachs18:cmp_ordering_derive_eq, r=Dylan-DPC 2022-03-18 21:50:48 +01:00
tests Rollup merge of #95017 - zachs18:cmp_ordering_derive_eq, r=Dylan-DPC 2022-03-18 21:50:48 +01:00
Cargo.toml Build libcore as 2021 in a few more places 2022-02-06 15:41:01 -08:00