diff --git a/move-analyzer/src/symbols.rs b/move-analyzer/src/symbols.rs index 9f7702bc9e..80430c26ee 100644 --- a/move-analyzer/src/symbols.rs +++ b/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/move-borrow-graph/src/references.rs b/move-borrow-graph/src/references.rs index c04e390c37..df2658872f 100644 --- a/move-borrow-graph/src/references.rs +++ b/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/move-compiler/src/shared/unique_set.rs b/move-compiler/src/shared/unique_set.rs index bdbedd1d0f..fc239b4473 100644 --- a/move-compiler/src/shared/unique_set.rs +++ b/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/move-core/types/src/gas_algebra.rs b/move-core/types/src/gas_algebra.rs index bcb62acb86..589c8521c1 100644 --- a/move-core/types/src/gas_algebra.rs +++ b/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)) } }