Skip to content

implement PartialEq<VecDeque<U>> for Vec<T>, &[T], &mut [T], [T; N] and &mut [T; N]#152972

Open
iAeternus wants to merge 2 commits intorust-lang:mainfrom
iAeternus:fix-vecdeque-partialeq-symmetry
Open

implement PartialEq<VecDeque<U>> for Vec<T>, &[T], &mut [T], [T; N] and &mut [T; N]#152972
iAeternus wants to merge 2 commits intorust-lang:mainfrom
iAeternus:fix-vecdeque-partialeq-symmetry

Conversation

@iAeternus
Copy link

@iAeternus iAeternus commented Feb 22, 2026

This PR is a response to #152830. It implement PartialEq<VecDeque> for Vec, &[T], &mut [T], [T; N] and &mut [T; N]. To be symmetrical with the standard library's __impl_slice_eq1, I added the __impl_slice_eq2 macro to generate the implementation. Additionally, I added the reverse equality unit test (test_partial_eq_vecdeque_reverse), modified too_generic_eval_ice.current.stderr, and passed the local tests.
This PR does not involve the comparison between Cow vs Vec and Cow vs &mut [T].
PS:
This is my first time participating in this project. If there are any mistakes, please feel free to correct me.

@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 Feb 22, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 22, 2026

r? @joboet

rustbot has assigned @joboet.
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, joboet

@rust-log-analyzer

This comment has been minimized.

@workingjubilee
Copy link
Member

...who says "corrigendum"? This isn't an academics paper, this is a PR. Your PR's description should be as succinct as you can make it, and written by hand in your own words. See https://forge.rust-lang.org/how-to-start-contributing.html#etiquette

@workingjubilee
Copy link
Member

This PR is already addressed by #149045

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 22, 2026
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 22, 2026
@workingjubilee
Copy link
Member

Wait, this isn't addressed by that, this is VecDeque not Vec.

@workingjubilee workingjubilee added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Feb 22, 2026
@rust-log-analyzer

This comment has been minimized.

@joboet
Copy link
Member

joboet commented Feb 25, 2026

r? libs-api

This will need an FCP.

This is my first time participating in this project. If there are any mistakes, please feel free to correct me.

Welcome! As it stands, the PR description is very bloated and reads like the LLM-generated robot-speak that it is (if you read it through, every information is repeated twice). That comes across as quite rude; after all, why should anyone spend time on your work if you didn't invest your?

So please, write your contributions yourself. As far as I can tell from your profile, English isn't your first language (it isn't for me either). Using translation tools is completely fine, but please make sure that the generated output is close to what you had originally written. Try prompting the LLM to keep that in mind – context matters, even and especially for mindless stochastic parrots. And in the end, even the most nuanced prompt cannot and should not replace a manual review of the output.

@rustbot author
until then.

@rustbot rustbot assigned dtolnay and unassigned joboet Feb 25, 2026
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 25, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 25, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@iAeternus
Copy link
Author

r? libs-api

This will need an FCP.

This is my first time participating in this project. If there are any mistakes, please feel free to correct me.

Welcome! As it stands, the PR description is very bloated and reads like the LLM-generated robot-speak that it is (if you read it through, every information is repeated twice). That comes across as quite rude; after all, why should anyone spend time on your work if you didn't invest your?

So please, write your contributions yourself. As far as I can tell from your profile, English isn't your first language (it isn't for me either). Using translation tools is completely fine, but please make sure that the generated output is close to what you had originally written. Try prompting the LLM to keep that in mind – context matters, even and especially for mindless stochastic parrots. And in the end, even the most nuanced prompt cannot and should not replace a manual review of the output.

@rustbot author until then.

Thank you for your suggestion. I have rewritten the PR description. From now on, I will describe the PR in my own words.

@iAeternus iAeternus changed the title alloc: make VecDeque partial equality symmetric with vec/slice/array implement PartialEq<VecDeque<U>> for Vec<T>, &[T], &mut [T], [T; N] and &mut [T; N] Feb 26, 2026
@iAeternus
Copy link
Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants