rust/library/alloc
Dylan DPC 6ed1a67b38
Rollup merge of #93755 - ChayimFriedman2:allow-comparing-vecs-with-different-allocators, r=dtolnay
Allow comparing `Vec`s with different allocators using `==`

See https://stackoverflow.com/q/71021633/7884305.

I did not changed the `PartialOrd` impl too because it was not generic already (didn't support `Vec<T> <=> Vec<U> where T: PartialOrd<U>`).

Does it needs tests?

I don't think this will hurt type inference much because the default allocator is usually not inferred (`new()` specifies it directly, and even with other allocators, you pass the allocator to `new_in()` so the compiler usually knows the type).

I think this requires FCP since the impls are already stable.
2022-03-28 04:12:10 +02:00
..
benches update vec::retain benchmarks 2021-12-04 16:20:35 +01:00
src Rollup merge of #93755 - ChayimFriedman2:allow-comparing-vecs-with-different-allocators, r=dtolnay 2022-03-28 04:12:10 +02:00
tests Debug print char 0 as '\0' rather than '\u{0}' 2022-03-27 04:49:10 -07:00
Cargo.toml Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00