Skip to content

derive_ord_xor_partial_ord lint expectation unfulfilled but also triggered #16298

@spearman

Description

@spearman

Description

I just updated to the latest nightly (rustc 1.94.0-nightly (2ca7bcd03 2025-12-23) and started seeing this issue.

The expectation is unfulfilled but clippy is also warning on the same item for the same lint (derive_ord_xor_partial_ord). I haven't seen it with any other lints.

Code is here https://gitlab.com/spearman/math-utils-rs/-/blob/2295a63a8250a9a4c8663eb22eb5a46b5744c3d1/src/types/mod.rs#L1142-1143

error: you are implementing `Ord` explicitly but have derived `PartialOrd`
    --> src/types/mod.rs:1143:1
     |
1143 | / impl <S : OrderedField> Ord for Normalized <S> {
1144 | |   fn cmp (&self, other : &Self) -> std::cmp::Ordering {
1145 | |     // safe to unwrap: normalized values are never NaN
1146 | |     self.partial_cmp (other).unwrap()
1147 | |   }
1148 | | }
     | |_^
     |
note: `PartialOrd` implemented here
    --> src/types/mod.rs:174:50
     |
 174 | #[derive(Clone, Copy, Debug, Default, PartialEq, PartialOrd)]
     |                                                  ^^^^^^^^^^
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord
     = note: `#[deny(clippy::derive_ord_xor_partial_ord)]` on by default

error: this lint expectation is unfulfilled
    --> src/types/mod.rs:1142:10
     |
1142 | #[expect(clippy::derive_ord_xor_partial_ord)]
     |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: `-D unfulfilled-lint-expectations` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(unfulfilled_lint_expectations)]`

Version

rustc 1.94.0-nightly (2ca7bcd03 2025-12-23)
binary: rustc
commit-hash: 2ca7bcd03b87b52f7055a59b817443b0ac4a530d
commit-date: 2025-12-23
host: x86_64-unknown-linux-gnu
release: 1.94.0-nightly
LLVM version: 21.1.8

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions