Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive Eq for std::cmp::Ordering, instead of using manual impl. #95017

Merged
merged 2 commits into from
Mar 19, 2022

Commits on Mar 16, 2022

  1. 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 Orderings as const generic parameters.
    zachs18 committed Mar 16, 2022
    Configuration menu
    Copy the full SHA
    ba611d5 View commit details
    Browse the repository at this point in the history
  2. Add test for StructuralEq for std::cmp::Ordering.

    Added test in library/core/tests/cmp.rs that ensures that `const`s of type `Ordering`s can be used in patterns.
    zachs18 committed Mar 16, 2022
    Configuration menu
    Copy the full SHA
    b13b495 View commit details
    Browse the repository at this point in the history