Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
3 changes: 3 additions & 0 deletions external-crates/move/move-analyzer/src/symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down Expand Up @@ -167,6 +169,7 @@ struct StructDef {
field_defs: Vec<FieldDef>,
}

#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
#[derive(Derivative, Debug, Clone, PartialEq, Eq)]
#[derivative(PartialOrd, Ord)]
pub struct FunctionDef {
Expand Down
1 change: 1 addition & 0 deletions external-crates/move/move-borrow-graph/src/references.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ impl<Loc: Copy, Lbl: Clone + Ord> PartialEq for BorrowEdge<Loc, Lbl> {

impl<Loc: Copy, Lbl: Clone + Ord> Eq for BorrowEdge<Loc, Lbl> {}

#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
impl<Loc: Copy, Lbl: Clone + Ord> PartialOrd for BorrowEdge<Loc, Lbl> {
fn partial_cmp(&self, other: &BorrowEdge<Loc, Lbl>) -> Option<Ordering> {
BorrowEdgeNoLoc::new(self).partial_cmp(&BorrowEdgeNoLoc::new(other))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ impl<T: TName> PartialEq for UniqueSet<T> {
}
impl<T: TName> Eq for UniqueSet<T> {}

#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
impl<T: TName> PartialOrd for UniqueSet<T> {
fn partial_cmp(&self, other: &UniqueSet<T>) -> Option<Ordering> {
(self.0).0.keys().partial_cmp((other.0).0.keys())
Expand Down
2 changes: 1 addition & 1 deletion external-crates/move/move-core/types/src/gas_algebra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl<U> Eq for GasQuantity<U> {}

impl<U> PartialOrd for GasQuantity<U> {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp_impl(other))
Some(std::cmp::Ord::cmp(self, other))
}
}

Expand Down