pub trait HumanLike{
fn full_name(&self) -> String;
}
impl<T> PartialEq for T where T: HumanLike {
fn eq(&self, other: &Self) -> bool {
self.full_name() == other.full_name()
}
}
It gave me this error. I don't know what to do.
= note: conflicting implementation in crate `core`:
- impl<A, B> PartialEq<&B> for &A
where A: PartialEq<B>, A: ?Sized, B: ?Sized;
= note: downstream crates may implement trait `HumanLike` for type `&_`
I really want to do this
(any Humanlike struct) == (any Humanlike struct)