about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/instance.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-09 16:21:21 +0100
committerGitHub <noreply@github.com>2024-03-09 16:21:21 +0100
commit7193ce0061625647166281b1965cfa320e170eb7 (patch)
treeca23dab2f3839143d11760c3ce8db630cbc5a34a /compiler/rustc_middle/src/ty/instance.rs
parentb14e8054af0da0e9adaaaa18fab6db20fce3d4a1 (diff)
parent7e1969ac13b94694bb6c9315dcecdc6b0ee344ad (diff)
downloadrust-7193ce0061625647166281b1965cfa320e170eb7.tar.gz
rust-7193ce0061625647166281b1965cfa320e170eb7.zip
Rollup merge of #122237 - fee1-dead-contrib:rmord, r=compiler-errors
Remove `Ord` from `ClosureKind`

Using `Ord` to accomplish a meaning of subset relationship can be hard to read. The existing uses for that are easily replaced with a `match`, and in my opinion, more readable without needing to resorting to comments to explain the intention.

cc `@compiler-errors`
Diffstat (limited to 'compiler/rustc_middle/src/ty/instance.rs')
-rw-r--r--compiler/rustc_middle/src/ty/instance.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/instance.rs b/compiler/rustc_middle/src/ty/instance.rs
index 9fc8d418f5b..814c3629b08 100644
--- a/compiler/rustc_middle/src/ty/instance.rs
+++ b/compiler/rustc_middle/src/ty/instance.rs
@@ -30,7 +30,7 @@ pub struct Instance<'tcx> {
     pub args: GenericArgsRef<'tcx>,
 }
 
-#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
+#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
 #[derive(TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable, Lift)]
 pub enum InstanceDef<'tcx> {
     /// A user-defined callable item.