Closed
Description
Proposal
Problem statement
PartialOrd
cannot currently be used on vectors allocated with different allocators.
Motivating examples or use cases
- It is consistent with
PartialEq<Vec<U, A2>> for Vec<T, A1>
. - Writing tests for/using data structures that are parameterized by an allocator may be tedious due to the fact that an underlying vector cannot be compared with different allocators.
Solution sketch
See PR: rust-lang/rust#112632
Alternatives
Compare underlying slices via Deref<Target = [T]>
.