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

avoid linting possible_truncation on bit-reducing operations #7819

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

llogiq
Copy link
Contributor

@llogiq llogiq commented Oct 14, 2021


Please write a short comment explaining your change (or "none" for internal only changes)

changelog: avoid linting possible_truncation on bit-reducing operations

@rust-highfive
Copy link

r? @flip1995

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 14, 2021
@llogiq
Copy link
Contributor Author

llogiq commented Oct 15, 2021

There's still something wrong; I have apparently picked the false test case. Will fix shortly.

@llogiq llogiq force-pushed the avoid-linting-impossible-truncation branch 3 times, most recently from 702f0f3 to f3dd5af Compare October 15, 2021 21:33
@llogiq
Copy link
Contributor Author

llogiq commented Oct 16, 2021

@flip1995 this is now ready for review.

@bors
Copy link
Collaborator

bors commented Oct 21, 2021

☔ The latest upstream changes (presumably #7850) made this pull request unmergeable. Please resolve the merge conflicts.

@llogiq llogiq force-pushed the avoid-linting-impossible-truncation branch from 7b130dd to da94fb2 Compare October 23, 2021 13:27
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

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

Sorry for procrastinating this PR for so long. BitOp things make my head hurt 😄

clippy_lints/src/casts/cast_possible_truncation.rs Outdated Show resolved Hide resolved
tests/ui/cast.rs Outdated Show resolved Hide resolved
@flip1995 flip1995 added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Oct 28, 2021
@llogiq llogiq force-pushed the avoid-linting-impossible-truncation branch from da94fb2 to f3ae32c Compare October 28, 2021 21:30
@llogiq
Copy link
Contributor Author

llogiq commented Oct 29, 2021

Thanks for the review. I hope I have addressed all your concerns.

@llogiq
Copy link
Contributor Author

llogiq commented Oct 29, 2021

@flip1995 r?

@llogiq llogiq force-pushed the avoid-linting-impossible-truncation branch from f3ae32c to 00ea73e Compare October 29, 2021 19:59
@llogiq
Copy link
Contributor Author

llogiq commented Oct 30, 2021

Anything else we need to look at?

@flip1995
Copy link
Member

flip1995 commented Nov 2, 2021

Anything else we need to look at?

There are probably other cases, where reductions could be applied, but those can just be added to the apply_reductions function once they come up.

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Nov 2, 2021

📌 Commit 00ea73e has been approved by flip1995

@bors
Copy link
Collaborator

bors commented Nov 2, 2021

⌛ Testing commit 00ea73e with merge 4e355eb...

@bors
Copy link
Collaborator

bors commented Nov 2, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 4e355eb to master...

@bors bors merged commit 4e355eb into master Nov 2, 2021
@flip1995 flip1995 deleted the avoid-linting-impossible-truncation branch November 4, 2021 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants