feat: add symmetric PartialEq impls for Vec, &[T], &mut [T] versus Cow<'_, [T]> - #156160
feat: add symmetric PartialEq impls for Vec, &[T], &mut [T] versus Cow<'_, [T]>#156160kx0101 wants to merge 2 commits into
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
had to update the two UI tests expected compiler-error snapshots so they reflect the new pretty interesting! |
|
Starting a crater run to check if this breaks type inference in the ecosystem. @bors try |
This comment has been minimized.
This comment has been minimized.
feat: add symmetric PartialEq impls for Vec, &[T], &mut [T] versus Cow<'_, [T]>
|
@craterbot check |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
Footnotes
|
|
@craterbot check crates=https://crater-reports.s3.amazonaws.com/pr-156160/retry-regressed-list.txt name=pr-156160-1 p=1 Re-running to double check the spurious regressions. 3 regressed so far aren't real. |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
@Mark-Simulacrum great, thank you very much for your help! 🙏 |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
Footnotes
|
|
@rfcbot fcp merge libs-api This adds these impls (I think these are transcribed right out of the macro). Crater didn't find any inference breakage as a result of adding them. impl<T, U: Clone + PartialEq<T>, A: Allocator> PartialEq<Cow<'_, [U]>> for Vec<T, A> {}
impl<T, U: Clone + PartialEq<T>> PartialEq<Cow<'_, [U]>> for &[T] {}
impl<T, U: Clone + PartialEq<T>> PartialEq<Cow<'_, [U]>> for &mut [T] {} |
|
@Mark-Simulacrum has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
|
@Amanieu @joshtriplett @the8472 hello there! do you think we could merge this? 😄 thanks in advance! |
add the missing reverse
PartialEq<Cow<'_, [U]>>impls forVec<T, A>,&[T], and&mut [T], essentially mirroring the existing forwards inlibrary/alloc/src/vec/partial_eq.rspartially addresses #152830. The
VecDequehalf of that issue is being handled separately by #152972, so there is no overlap with this PRalso fyi: verified locally with
./x test library/alloctests --stage 1and the newtest_partial_eq_cow_symmetrictest passes alongside the existing alloc test suite