Rollup merge of #130317 - compiler-errors:no-ord, r=jackh726

`ProjectionElem` and `UnOp`/`BinOp` dont need to be `PartialOrd`/`Ord`

These types don't really admit a natural ordering and no code seems to rely on it, so let's remove it.
This commit is contained in:
Stuart Cook 2024-09-14 11:53:13 +10:00 committed by GitHub
commit 89dd3f91a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1094,7 +1094,7 @@ pub struct Place<'tcx> {
pub projection: &'tcx List<PlaceElem<'tcx>>,
}
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
#[derive(TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)]
pub enum ProjectionElem<V, T> {
Deref,
@ -1468,7 +1468,7 @@ pub enum NullOp<'tcx> {
UbChecks,
}
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
#[derive(HashStable, TyEncodable, TyDecodable, TypeFoldable, TypeVisitable)]
pub enum UnOp {
/// The `!` operator for logical inversion
@ -1486,7 +1486,7 @@ pub enum UnOp {
PtrMetadata,
}
#[derive(Copy, Clone, Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
#[derive(TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)]
pub enum BinOp {
/// The `+` operator (addition)