about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-03-18 21:50:48 +0100
committerGitHub <noreply@github.com>2022-03-18 21:50:48 +0100
commit4ead6d9dc7d32c0c54adb444e529b772bce6370c (patch)
tree8acf8848133d65d937e33561d4032d18aff86b4b /library/std/src
parentc27192041ae1a34c63eda1102ed1b6c6bfe7eb13 (diff)
parentb13b495b918026fc5f3bf059bbde19c832ffe3c0 (diff)
downloadrust-4ead6d9dc7d32c0c54adb444e529b772bce6370c.tar.gz
rust-4ead6d9dc7d32c0c54adb444e529b772bce6370c.zip
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`.
Diffstat (limited to 'library/std/src')
0 files changed, 0 insertions, 0 deletions