Rollup merge of #146690 - npmccallum:convo, r=tgross35
add `[const] PartialEq` bound to `PartialOrd` This change is included for discussion purposes. The PartialOrd bound on PartialEq is not strictly necessary. It is, rather, logical: anything which is orderable should by definition have equality. Is the same true for constness? Should every type which is const orderable also have const equality?
This commit is contained in:
commit
96a4ae3ab9
1 changed files with 3 additions and 1 deletions
|
|
@ -1351,7 +1351,9 @@ pub macro Ord($item:item) {
|
|||
#[rustc_diagnostic_item = "PartialOrd"]
|
||||
#[allow(multiple_supertrait_upcastable)] // FIXME(sized_hierarchy): remove this
|
||||
#[rustc_const_unstable(feature = "const_cmp", issue = "143800")]
|
||||
pub const trait PartialOrd<Rhs: PointeeSized = Self>: PartialEq<Rhs> + PointeeSized {
|
||||
pub const trait PartialOrd<Rhs: PointeeSized = Self>:
|
||||
[const] PartialEq<Rhs> + PointeeSized
|
||||
{
|
||||
/// This method returns an ordering between `self` and `other` values if one exists.
|
||||
///
|
||||
/// # Examples
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue