1
Fork 0

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`
This commit is contained in:
Matthias Krüger 2024-03-09 16:21:21 +01:00 committed by GitHub
commit 7193ce0061
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 42 additions and 28 deletions

View file

@ -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.