-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Stabilize cmp #20065
Stabilize cmp #20065
Conversation
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. |
@@ -79,7 +81,7 @@ pub trait PartialEq<Sized? Rhs = Self> for Sized? { | |||
/// - reflexive: `a == a`; | |||
/// - symmetric: `a == b` implies `b == a`; and | |||
/// - transitive: `a == b` and `b == c` implies `a == c`. | |||
#[unstable = "Definition may change slightly after trait reform"] | |||
#[stable] |
There was a problem hiding this comment.
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!)
@alexcrichton I believe all your comments have now been addressed. |
@@ -1 +1 @@ | |||
Subproject commit 3a37981744a5af2433fed551f742465c78c9af7f | |||
Subproject commit aed73472416064642911af790b25d57c9390b6c7 |
There was a problem hiding this comment.
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
r=me with a minor nit plus a |
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]
#[unstable = "Definition may change slightly after trait reform"] | ||
pub trait Eq<Sized? Rhs = Self> for Sized?: PartialEq<Rhs> { | ||
#[stable] | ||
pub trait Eq for Sized?: PartialEq<Self> { |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
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
This patch marks
PartialEq
,Eq
,PartialOrd
, andOrd
as#[stable]
, as well as the majorify of manual implementaitons of thesetraits. 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