Skip to content

Conversation

@aturon
Copy link
Contributor

@aturon aturon commented Dec 20, 2014

This patch marks PartialEq, Eq, PartialOrd, and Ord as
#[stable], as well as the majorify of manual implementaitons of these
traits. The traits match the reform RFC.

In the future, many of the impls should be generalized; see #20063.
However, there is no problem stabilizing the less general impls, since
generalizing later is not a breaking change.

r? @alexcrichton

@alexcrichton
Copy link
Member

I believe @aturon is on vacation for the coming week, but I'd like to discuss this in more detail with him, so I'm holding off on the r+ for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'll need to remove assert_receiver_is_total_eq before marking this stable (but it's close!)

@aturon
Copy link
Contributor Author

aturon commented Dec 30, 2014

@alexcrichton I believe all your comments have now been addressed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was reverted by accident

@alexcrichton
Copy link
Member

r=me with a minor nit plus a [breaking-change] tag

This patch marks `PartialEq`, `Eq`, `PartialOrd`, and `Ord` as
`#[stable]`, as well as the majorify of manual implementaitons of these
traits. The traits match the [reform
RFC](rust-lang/rfcs#439).

Along the way, two changes are made:

* The recently-added type parameters for `Ord` and `Eq` are
  removed. These were mistakenly added while adding them to `PartialOrd`
  and `PartialEq`, but they don't make sense given the laws that are
  required for (and use cases for) `Ord` and `Eq`.

* More explicit laws are added for `PartialEq` and `PartialOrd`,
  connecting them to their associated mathematical concepts.

In the future, many of the impls should be generalized; see
since generalizing later is not a breaking change.

[breaking-change]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're stabilizing this with assert_receiver_is_total_eq?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under the assumption that we can remove it before 1.0 final.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 31, 2014
This patch marks `PartialEq`, `Eq`, `PartialOrd`, and `Ord` as
`#[stable]`, as well as the majorify of manual implementaitons of these
traits. The traits match the [reform RFC](rust-lang/rfcs#439).

In the future, many of the impls should be generalized; see rust-lang#20063.
However, there is no problem stabilizing the less general impls, since
generalizing later is not a breaking change.

r? @alexcrichton
@bors bors merged commit b94bcbf into rust-lang:master Dec 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants