diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2024-09-14 11:53:13 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-14 11:53:13 +1000 |
| commit | 89dd3f91a8ac7a560bda4e1927131230ef96df17 (patch) | |
| tree | 41f2a794d27a865707ebfcb01c9e7220e0de97dd | |
| parent | 59698a711f8f7101ca18427c0a198f8dad4a2961 (diff) | |
| parent | c8233a4c6f4f0cd4e39b11170060b1e5e8a54141 (diff) | |
| download | rust-89dd3f91a8ac7a560bda4e1927131230ef96df17.tar.gz rust-89dd3f91a8ac7a560bda4e1927131230ef96df17.zip | |
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.
| -rw-r--r-- | compiler/rustc_middle/src/mir/syntax.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/mir/syntax.rs b/compiler/rustc_middle/src/mir/syntax.rs index 22a4b688c51..f5590aa2762 100644 --- a/compiler/rustc_middle/src/mir/syntax.rs +++ b/compiler/rustc_middle/src/mir/syntax.rs @@ -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) |
