Conversation
|
r? @joboet rustbot has assigned @joboet. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
...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 |
|
This PR is already addressed by #149045 |
|
Wait, this isn't addressed by that, this is VecDeque not Vec. |
This comment has been minimized.
This comment has been minimized.
|
r? libs-api This will need an FCP.
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 |
|
Reminder, once the PR becomes ready for a review, use |
Thank you for your suggestion. I have rewritten the PR description. From now on, I will describe the PR in my own words. |
|
@rustbot ready |
|
Starting a crater run to check if this breaks type inference in the ecosystem. @bors try |
|
@iAeternus: 🔑 Insufficient privileges: not in try users |
e0d2a84 to
b50d79a
Compare
|
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. |
This comment has been minimized.
This comment has been minimized.
|
I have re-examined whether __impl_slice_eq2! is necessary in this PR. __impl_slice_eq1! assumes that self is a VecDeque, since it calls self.as_slices(). In the reversed PartialEq implementations, Vec, slices, and arrays are on the self side, while VecDeque is on the other side. Therefore, the existing __impl_slice_eq1! cannot be reused simply by swapping the macro parameters.
I chose the first approach because, for such a small patch, a separate macro for the reversed comparison is straightforward and easy to understand. The other approaches introduce additional complexity without providing much benefit here. Given the standard library's preference for keeping the implementation simple and localized, I think the first approach is sufficient. |
|
Updated the PR title to include the missing &[T; N]. This implementation was already included in the PR; it was simply omitted from the title. |
|
Hi @dtolnay, just following up on this PR. The Cow half of #152830 was merged in #156160, while the VecDeque half is still handled separately by this PR. The implementation has been rebased and updated, and the PR is ready for review. @joboet previously mentioned that this change will need an FCP. Please let me know if there is anything else I should do to move this forward. |
|
r? libs @rustbot label I-libs-nominated We should be fine just discussing this at the meeting, but most likely we will need a crater run to verify this doesn't cause inference failures. |
|
I previously tried to start a crater run for this PR, but I don't have "@bors try" permissions. |
|
Unknown command "try"". Run |
|
@craterbot check |
|
🚨 Error: missing start toolchain 🆘 If you have any trouble with Crater please ask in t-infra on Zulip |
|
@bors try |
This comment has been minimized.
This comment has been minimized.
…<try> implement PartialEq<VecDeque<U>> for Vec<T>, &[T], &mut [T], [T; N], &[T; N] and &mut [T; N]
|
@craterbot check |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
One thing I noticed: |
|
Yes, you should. The documentation should reflect the latest version. |
This comment has been minimized.
This comment has been minimized.
|
(note: the error is because you are using the same stability attribute for the new and old impls. I think you might need to move the attribute to be part of the macro call instead to fix this) |
View all comments
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.