If I derive both PartialOrd and Ord, I get unexpected bounds for PartialOrd.
#[derive(educe::Educe)]
#[educe(PartialEq, Eq, PartialOrd)]
pub struct Foo<T>(T);
results in:
impl<T> ::core::cmp::PartialOrd for Foo<T>
where
T: ::core::cmp::PartialOrd,
Self: ::core::cmp::PartialEq,
{ ... }
but:
#[derive(educe::Educe)]
#[educe(PartialEq, Eq, PartialOrd, Ord)]
pub struct Foo<T>(T);
results in:
impl<T> ::core::cmp::PartialOrd for Foo<T>
where
T: ::core::cmp::Ord,
Self: ::core::cmp::Eq,
{ ... }
If we compare this to the standard library, we get the expected bounds:
#[derive(PartialEq, Eq, PartialOrd, Ord)]
pub struct Foo<T>(T);
impl<T: ::core::cmp::PartialOrd> ::core::cmp::PartialOrd for Foo<T> { ... }
(And why does educe add a Self bound here?)