Skip to content

Add missing PartialEq impls for Vec and array#156897

Closed
fallofpheonix wants to merge 1 commit into
rust-lang:mainfrom
fallofpheonix:fix-vec-array-partialeq
Closed

Add missing PartialEq impls for Vec and array#156897
fallofpheonix wants to merge 1 commit into
rust-lang:mainfrom
fallofpheonix:fix-vec-array-partialeq

Conversation

@fallofpheonix
Copy link
Copy Markdown
Contributor

Fixes #149017.

This PR adds the missing PartialEq implementations between Vec<T> and [U; N], specifically:

  • [T; N] == Vec<U>
  • &[T; N] == Vec<U>
  • &mut [T; N] == Vec<U>
  • Vec<T> == &mut [U; N]

Tested locally by adding equality assertions in library/alloctests/tests/vec.rs.

Please let me know if any other adjustments are needed.

Copilot AI review requested due to automatic review settings May 24, 2026 23:38
@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 24, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 24, 2026

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

@rustbot

This comment has been minimized.

This comment was marked as abuse.

@fallofpheonix fallofpheonix force-pushed the fix-vec-array-partialeq branch from a789ba6 to a580e25 Compare May 24, 2026 23:42
@rust-log-analyzer

This comment has been minimized.

@fallofpheonix fallofpheonix force-pushed the fix-vec-array-partialeq branch from a580e25 to 921a74c Compare May 25, 2026 00:03
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 25, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rust-log-analyzer

This comment has been minimized.

This PR adds the missing `PartialEq` implementations between `Vec<T>` and `[U; N]`, including symmetric and reference variants.
@fallofpheonix fallofpheonix force-pushed the fix-vec-array-partialeq branch from 921a74c to 9361fa7 Compare May 25, 2026 01:01
@bjorn3
Copy link
Copy Markdown
Member

bjorn3 commented May 25, 2026

This seems like it could cause inference failures. Maybe needs a crater run?

@apiraino
Copy link
Copy Markdown
Contributor

apiraino commented May 25, 2026

@fallofpheonix please do not trigger unprompted reviews from bots in our repository, thanks.

This was already pointed out in #156876 (comment)

@workingjubilee
Copy link
Copy Markdown
Member

A pull request is already in flight for #149045 and this one will just lead to duplicating process because it overlaps.

Though why didn't a crater get run for that one...?

@fallofpheonix
Copy link
Copy Markdown
Contributor Author

Closing in favor of the existing PR #149045 as pointed out by @workingjubilee. Thanks for the heads up, and apologies for the duplicate! Also, noted on the unprompted bot reviews (@apiraino) — I'll make sure not to trigger them in the future.

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 25, 2026
@fallofpheonix fallofpheonix deleted the fix-vec-array-partialeq branch May 25, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Missing impl PartialEq<Vec<T>> for [T; N]

8 participants