Skip to content

Commit fc78683

Browse files
committed
Don't blanket-derive Ord/PartialOrd
1 parent 126fc80 commit fc78683

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

crates/red_knot_python_semantic/src/semantic_index/constraint.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use crate::semantic_index::symbol::{FileScopeId, ScopeId};
88

99
// A scoped identifier for each `Constraint` in a scope.
1010
#[newtype_index]
11+
#[derive(Ord, PartialOrd)]
1112
pub(crate) struct ScopedConstraintId;
1213

1314
// A collection of constraints. This is currently stored in `UseDefMap`, which means we maintain a

crates/ruff_macros/src/newtype_index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub(super) fn generate_newtype_index(item: ItemStruct) -> syn::Result<proc_macro
3232
let semi_token = semi_token.unwrap_or_default();
3333
let output = quote! {
3434
#(#attrs)*
35-
#[derive(Copy, Clone, Eq, PartialEq, Hash, Ord, PartialOrd)]
35+
#[derive(Copy, Clone, Eq, PartialEq, Hash)]
3636
#vis #struct_token #ident(std::num::NonZeroU32)#semi_token
3737

3838
impl #ident {

0 commit comments

Comments
 (0)