Skip to content

Conversation

@Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Aug 29, 2025

The helper functions/types could be pulled into clippy_utils. I'm going to go through and sort that crate out in a separate PR first rather than add to it now.

changelog: [ineffective_bit_masks]: Lint xor expressions

@rustbot
Copy link
Collaborator

rustbot commented Aug 29, 2025

r? @llogiq

rustbot has assigned @llogiq.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 29, 2025
LL | let _ = x & (0b0100 | 0b0010) == (0b0111 ^ 0b1000);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `0x6` is missing bits contained in the compared constant `0xf`
Copy link
Member

Choose a reason for hiding this comment

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

Maybe you should add extra notes when the constant is not present as a literal, for example one pointing to 0b0100 | 0b0010 saying "this evaluates to 0x6, ditto for 0xf.

@rustbot
Copy link
Collaborator

rustbot commented Oct 7, 2025

☔ The latest upstream changes (possibly f3c020c) made this pull request unmergeable. Please resolve the merge conflicts.

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.

4 participants