PartialEq impls seem more specific than necessary

Does anyone know why PartialEq has a number of impls over a single type when there could potentially be more general ones? For example, this one for Cell<T>:

impl<T> PartialEq<Cell<T>> for Cell<T> where
    T: PartialEq<T> + Copy

Which could be:

impl<A, B> PartialEq<Cell<B>> for Cell<A> where
    A: PartialEq<B> + Copy,
    B: Copy

I'm curious if there's subtle reasons to avoid the second form that I can't see, or if this is a historical artefact or simply that they just haven't been implemented yet.

Thanks :slight_smile:

I don't think there's a big reason for this, no.

Maybe type inference, see this thread.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.