rust-lang / libs-team

The home of the library team
Apache License 2.0
116 stars 18 forks source link

Make `Box` comparisons independent of allocator choice #241

Closed gootorov closed 1 year ago

gootorov commented 1 year ago

Proposal

Problem statement

Comparing Boxs that are allocated by different allocators via PartialEq or PartialOrd is not currently possible.

Motivating examples or use cases

Solution sketch

See PR: https://github.com/rust-lang/rust/pull/112628

Alternatives

m-ou-se commented 1 year ago

We discussed this briefly in the libs-api meeting. This is fine. Since this doesn't affect the stable API (as Boxes with a custom allocator are unstable), this doesn't need to go through FCP.