Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assigning_clones: move to pedantic so it is allow by default #12779

Merged
merged 1 commit into from May 15, 2024

Conversation

de-vri-es
Copy link
Contributor

@de-vri-es de-vri-es commented May 8, 2024

In a nutshell, the assigning_clones lint suggests to make your code less readable for a small performance gain. See #12778 for more motivation.

fixes #12778

changelog: [assigning_clones]: move to the pedantic group

@rustbot
Copy link
Collaborator

rustbot commented May 8, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @y21 (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 rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 8, 2024
@de-vri-es de-vri-es force-pushed the move-assigng-clones-to-pedantic branch from a87bba3 to 37808d0 Compare May 8, 2024 09:49
@de-vri-es de-vri-es changed the title assigning_clone: change to pedantic group to allow it by default. assigning_clone: move to pedantic so it is allow by default May 8, 2024
@de-vri-es de-vri-es changed the title assigning_clone: move to pedantic so it is allow by default assigning_clones: move to pedantic so it is allow by default May 8, 2024
@de-vri-es de-vri-es force-pushed the move-assigng-clones-to-pedantic branch from 37808d0 to 076f2e5 Compare May 8, 2024 09:51
@y21
Copy link
Member

y21 commented May 9, 2024

I opened a thread on zulip to discuss this first and see if others have strong preference on the category and want to wait it out a bit: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/assigning_clones.20lint.20category/near/437732612

@y21 y21 added the S-needs-discussion Status: Needs further discussion before merging or work can be started label May 9, 2024
@workingjubilee
Copy link
Contributor

possible other move: knock it back to the nursery for a bit?

@blyxyas
Copy link
Member

blyxyas commented May 9, 2024

The lint's author has already moved it to nursery after the first couple issues to work a little bit more on the lint. I'm sure of it, I reviewed the PR weeks ago.

I'm not sure if something happened on the beta backporting process, or maybe the commit didn't go through?

@workingjubilee
Copy link
Contributor

oh okay! it is plausible I am just slightly oblivious.

@blyxyas
Copy link
Member

blyxyas commented May 9, 2024

Or maybe I'm just having some Mandela effect, because I just checked Kobzol's PR history on this repo and he didn't create that PR... And there doesn't seem to exist any changes on the blame for that specific section.

We should definitely move it to nursery. There are some issues (some are being fixed by #12473) that we accidentally didn't account for.

@y21
Copy link
Member

y21 commented May 12, 2024

Most of the issues already have a fix PR up, but I'm also fine with moving this to nursery, at least for the time being.

Looking at #12778 again and issues/PRs from other repos that link there, it does seem like people agree with that this lint regresses readability and it seems like the initial idea was for this lint to be in pedantic anyway according to the zulip meeting a year ago when this was first discussed, so we'll probably want to have it at most in pedantic too once the issues are sorted out.

@de-vri-es
Copy link
Contributor Author

I think all those fixes are thanks to it being a warn-by-default lint now :p

Sounds like it doesn't necessarily need to go back to the nursery anymore.

Maaaybe there should be a perf-pedantic category too? Or perf-extra maybe. Then it would be easy for people to enable lints like this in one go, without having to go over all possible extra performance lints manually.

Copy link
Member

@y21 y21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this seems fine, there seems to be generally more people that agree that it hurts readability than not from the few reactions that I've seen. Let's get this merged now so that it makes it into the sync in time and wouldn't need to wait another 2 weeks to get to nightly.

I agree that moving nursery might not be necessary anymore with those fixes up. The remaining ones that don't have a PR fixing it are mostly similar subjective issues (e.g. the fact it's not useful in test code, which should not be so bad for a pedantic lint (but are still ones that should be fixed of course))

@y21
Copy link
Member

y21 commented May 15, 2024

Thanks. @bors r+

@bors
Copy link
Collaborator

bors commented May 15, 2024

📌 Commit 076f2e5 has been approved by y21

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented May 15, 2024

⌛ Testing commit 076f2e5 with merge a7f3265...

@bors
Copy link
Collaborator

bors commented May 15, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: y21
Pushing a7f3265 to master...

@bors bors merged commit a7f3265 into rust-lang:master May 15, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-needs-discussion Status: Needs further discussion before merging or work can be started S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

assigning_clones: makes code less readable and harder to maintain
6 participants