From 7e1969ac13b94694bb6c9315dcecdc6b0ee344ad Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Sat, 9 Mar 2024 21:16:18 +0800 Subject: 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. --- compiler/rustc_middle/src/ty/instance.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_middle/src/ty/instance.rs') diff --git a/compiler/rustc_middle/src/ty/instance.rs b/compiler/rustc_middle/src/ty/instance.rs index 260d0885089..e381bffa395 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. -- cgit 1.4.1-3-g733a5