Open
Description
With cmp/ops reform, all of the comparison traits allow the types of the two sides to differ. However, the traits provide a default type for the right-hand size that is the same as the left-hand side. Thus, an impl like:
impl<T: PartialEq> PartialEq for Rc<T> { ... }
is more limited than it needs to be; it could instead be
impl<U, T: PartialEq<U>> PartialEq<Rc<U>> for Rc<T> { ... }
(Of course, you could imagine being even more general than that, allowing Rc values to be compared to other values.)
The various impls in the standard library should probably be generalized along these lines; currently a few are but most aren't.