Skip to content

feat: add symmetric PartialEq impls for Vec, &[T], &mut [T] versus Cow<'_, [T]>#156160

Open
kx0101 wants to merge 2 commits into
rust-lang:mainfrom
kx0101:cow-vec-symmetric-partialeq
Open

feat: add symmetric PartialEq impls for Vec, &[T], &mut [T] versus Cow<'_, [T]>#156160
kx0101 wants to merge 2 commits into
rust-lang:mainfrom
kx0101:cow-vec-symmetric-partialeq

Conversation

@kx0101

@kx0101 kx0101 commented May 4, 2026

Copy link
Copy Markdown

add the missing reverse PartialEq<Cow<'_, [U]>> impls for Vec<T, A>, &[T], and &mut [T], essentially mirroring the existing forwards in library/alloc/src/vec/partial_eq.rs

partially addresses #152830. The VecDeque half of that issue is being handled separately by #152972, so there is no overlap with this PR

also fyi: verified locally with ./x test library/alloctests --stage 1 and the new test_partial_eq_cow_symmetric test passes alongside the existing alloc test suite

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 4, 2026
@rustbot

rustbot commented May 4, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: libs
  • libs expanded to 7 candidates
  • Random selection from Mark-Simulacrum, jhpratt, nia-e

@rust-log-analyzer

This comment has been minimized.

@kx0101

kx0101 commented May 5, 2026

Copy link
Copy Markdown
Author

had to update the two UI tests expected compiler-error snapshots so they reflect the new PartialEq<Cow<[U]>>

pretty interesting!

@Mark-Simulacrum Mark-Simulacrum added needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. S-waiting-on-t-libs-api Status: Awaiting decision from T-libs-api and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. S-waiting-on-t-libs-api Status: Awaiting decision from T-libs-api T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants