Skip to content

Make PartialOrd for Vec allocator independent #240

Closed
@gootorov

Description

@gootorov

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]>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ACP-acceptedAPI Change Proposal is accepted (seconded with no objections)T-libs-apiapi-change-proposalA proposal to add or alter unstable APIs in the standard libraries

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions