3

`assigning_clones` should respect MSRV by humannum14916 · Pull Request #12511 ·...

 1 month ago
source link: https://github.com/rust-lang/rust-clippy/pull/12511
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Conversation

Contributor

Fixes: #12502

This PR fixes the assigning_clones lint suggesting to use clone_from or clone_into on incompatible MSRVs.

assigning_clones will suggest using either clone_from or clone_into, both of which were stabilized in 1.63. If the current MSRV is below 1.63, the lint should not trigger.

changelog: [assigning_clones]: don't lint when the MSRV is below 1.63.

taiki-e reacted with heart emoji

Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Alexendoo (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

rustbot

added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label

Mar 19, 2024

Member

Great, thanks!

@bors r+

Collaborator

📌 Commit 7c0b2dd has been approved by Alexendoo

It is now in the queue for this repository.

Collaborator

⌛ Testing commit 7c0b2dd with merge 89aba8d...

Contributor

Hi, thanks for the PR, but I'm pretty sure that clone_from was not stabilized in 1.63 (https://doc.rust-lang.org/src/core/clone.rs.html#168). This should only limit clone_into.

Contributor

Author

Whoops! Sorry about that, I really should have double-checked exactly where to apply the MSRV check. I'll start working on a new PR to fix that, it looks like the proper location for the check would be in is_ok_to_suggest on a call.target of TargetTrait::ToOwned.

Kobzol reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Alexendoo

Alexendoo approved these changes
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

assigning_clones should respect MSRV

5 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK