diff --git a/.cargo/config b/.cargo/config index 7c661fc6b954c..0312fa7f565c1 100644 --- a/.cargo/config +++ b/.cargo/config @@ -22,7 +22,6 @@ move-clippy = [ "-Aclippy::new_without_default", "-Aclippy::box_default", "-Aclippy::manual_slice_size_calculation", - "-Aclippy::incorrect_partial_ord_impl_on_ord_type", ] [build] diff --git a/external-crates/move/move-analyzer/src/symbols.rs b/external-crates/move/move-analyzer/src/symbols.rs index 9f7702bc9e80c..80430c26eec70 100644 --- a/external-crates/move/move-analyzer/src/symbols.rs +++ b/external-crates/move/move-analyzer/src/symbols.rs @@ -46,6 +46,8 @@ //! definitions, the symbolicator builds a scope stack, entering encountered definitions and //! matching uses to a definition in the innermost scope. +#![allow(clippy::incorrect_partial_ord_impl_on_ord_type)] + use crate::{ context::Context, diagnostics::{lsp_diagnostics, lsp_empty_diagnostics}, @@ -167,6 +169,7 @@ struct StructDef { field_defs: Vec, } +#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)] #[derive(Derivative, Debug, Clone, PartialEq, Eq)] #[derivative(PartialOrd, Ord)] pub struct FunctionDef { diff --git a/external-crates/move/move-borrow-graph/src/references.rs b/external-crates/move/move-borrow-graph/src/references.rs index c04e390c37375..df2658872f695 100644 --- a/external-crates/move/move-borrow-graph/src/references.rs +++ b/external-crates/move/move-borrow-graph/src/references.rs @@ -209,6 +209,7 @@ impl PartialEq for BorrowEdge { impl Eq for BorrowEdge {} +#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)] impl PartialOrd for BorrowEdge { fn partial_cmp(&self, other: &BorrowEdge) -> Option { BorrowEdgeNoLoc::new(self).partial_cmp(&BorrowEdgeNoLoc::new(other)) diff --git a/external-crates/move/move-compiler/src/shared/unique_set.rs b/external-crates/move/move-compiler/src/shared/unique_set.rs index bdbedd1d0fb37..fc239b4473b88 100644 --- a/external-crates/move/move-compiler/src/shared/unique_set.rs +++ b/external-crates/move/move-compiler/src/shared/unique_set.rs @@ -117,6 +117,7 @@ impl PartialEq for UniqueSet { } impl Eq for UniqueSet {} +#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)] impl PartialOrd for UniqueSet { fn partial_cmp(&self, other: &UniqueSet) -> Option { (self.0).0.keys().partial_cmp((other.0).0.keys()) diff --git a/external-crates/move/move-core/types/src/gas_algebra.rs b/external-crates/move/move-core/types/src/gas_algebra.rs index bcb62acb86487..589c8521c1811 100644 --- a/external-crates/move/move-core/types/src/gas_algebra.rs +++ b/external-crates/move/move-core/types/src/gas_algebra.rs @@ -177,7 +177,7 @@ impl Eq for GasQuantity {} impl PartialOrd for GasQuantity { fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp_impl(other)) + Some(std::cmp::Ord::cmp(self, other)) } }