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

Implement a lint to replace manual bit rotations with rotate_left/rot… #12983

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

frp
Copy link
Contributor

@frp frp commented Jun 23, 2024

Fixes #6861

r? @llogiq


changelog: add [manual_rotate] lint

@rustbot
Copy link
Collaborator

rustbot commented Jun 23, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @llogiq (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 Jun 23, 2024
Copy link
Contributor

@llogiq llogiq left a comment

Choose a reason for hiding this comment

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

The doc tests currently fail to compile. I'll gladly approve this PR once that's fixed.

clippy_lints/src/manual_rotate.rs Outdated Show resolved Hide resolved
clippy_lints/src/manual_rotate.rs Outdated Show resolved Hide resolved
@frp frp force-pushed the manual_rotate branch 5 times, most recently from c99d991 to 657d60e Compare June 23, 2024 11:25
@frp frp requested a review from llogiq June 23, 2024 11:32
@llogiq
Copy link
Contributor

llogiq commented Jun 23, 2024

Thank you!

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 23, 2024

📌 Commit 657d60e has been approved by llogiq

It is now in the queue for this repository.

bors added a commit that referenced this pull request Jun 23, 2024
Implement a lint to replace manual bit rotations with rotate_left/rot…

Fixes #6861

r? `@llogiq`

---

changelog: add [`manual_rotate`] lint
@bors
Copy link
Collaborator

bors commented Jun 23, 2024

⌛ Testing commit 657d60e with merge d5ff1d5...

@bors
Copy link
Collaborator

bors commented Jun 23, 2024

💔 Test failed - checks-action_test

@llogiq
Copy link
Contributor

llogiq commented Jun 23, 2024

I cannot see how that error would be related. Might be transient.

@bors retry

@bors
Copy link
Collaborator

bors commented Jun 23, 2024

⌛ Testing commit 657d60e with merge fb831a5...

bors added a commit that referenced this pull request Jun 23, 2024
Implement a lint to replace manual bit rotations with rotate_left/rot…

Fixes #6861

r? `@llogiq`

---

changelog: add [`manual_rotate`] lint
@bors
Copy link
Collaborator

bors commented Jun 23, 2024

💔 Test failed - checks-action_test

bors added a commit that referenced this pull request Jun 23, 2024
use short message format in integration test

While checking #12983, bors came upon a cargo change that put "E0463" into the standard error (as part of a test case code snippet), which the integration test picked up to fail the build. Talk about unforeseen consequences.

So this PR just changes the integration test to use short message format in order to not include the code snippets in the output. Hopefully that will fix the problem.

r? `@Alexendoo`

---

changelog: none
@frp
Copy link
Contributor Author

frp commented Jun 23, 2024

I can reproduce the same failure locally by checking out master and re-running the integration test. So it's unrelated to my change.

The last change on master is #12965, and this test passed when it was merged (16h ago).

I think this commit in cargo might be the cause: rust-lang/cargo@28d213b - it adds the exact lines the integration test is unhappy about.

How do we proceed?

@llogiq
Copy link
Contributor

llogiq commented Jun 23, 2024

I have pushed a fix, which was just merged to master. If you pull & rebase onto that, it should work.

@llogiq
Copy link
Contributor

llogiq commented Jun 23, 2024

Thank you!

@bors r+

@bors
Copy link
Collaborator

bors commented Jun 23, 2024

📌 Commit 1768072 has been approved by llogiq

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jun 23, 2024

⌛ Testing commit 1768072 with merge b9143a3...

bors added a commit that referenced this pull request Jun 23, 2024
Implement a lint to replace manual bit rotations with rotate_left/rot…

Fixes #6861

r? `@llogiq`

---

changelog: add [`manual_rotate`] lint
@bors
Copy link
Collaborator

bors commented Jun 23, 2024

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

@bors
Copy link
Collaborator

bors commented Jun 23, 2024

👀 Test was successful, but fast-forwarding failed: 422 1 review requesting changes by reviewers with write access.

@llogiq
Copy link
Contributor

llogiq commented Jul 1, 2024

Thank you!

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 1, 2024

📌 Commit b08b8b8 has been approved by llogiq

It is now in the queue for this repository.

bors added a commit that referenced this pull request Jul 1, 2024
Implement a lint to replace manual bit rotations with rotate_left/rot…

Fixes #6861

r? `@llogiq`

---

changelog: add [`manual_rotate`] lint
@bors
Copy link
Collaborator

bors commented Jul 1, 2024

⌛ Testing commit b08b8b8 with merge 016fa15...

@bors
Copy link
Collaborator

bors commented Jul 1, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 016fa15 to master...

@bors
Copy link
Collaborator

bors commented Jul 1, 2024

👀 Test was successful, but fast-forwarding failed: 422 1 review requesting changes by reviewers with write access.

@llogiq
Copy link
Contributor

llogiq commented Jul 1, 2024

That is new.

@bors retry

@bors
Copy link
Collaborator

bors commented Jul 1, 2024

⌛ Testing commit b08b8b8 with merge 0abcd34...

@bors
Copy link
Collaborator

bors commented Jul 1, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 0abcd34 to master...

1 similar comment
@bors
Copy link
Collaborator

bors commented Jul 1, 2024

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: llogiq
Pushing 0abcd34 to master...

@bors bors merged commit 0abcd34 into rust-lang:master Jul 1, 2024
11 checks passed
@bors
Copy link
Collaborator

bors commented Jul 1, 2024

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest replacing hand made integer rotations with rotate_right/rotate_left
5 participants