Skip to content

Conversation

blyxyas
Copy link
Member

@blyxyas blyxyas commented Nov 26, 2024

clap-3.1.6 was not compiling on the rustc-perf benchmarks because of this lint. Also, the user could not allow the lint on the macro itself because it was checking Exprs, not whatever the input of bitflags! is.

error: &-masking with zero
   --> src/build/arg_settings.rs:197:1
    |
            (#[allow] here) 
197 | / bitflags! {
198 | |     struct Flags: u32 {
199 | |         const REQUIRED         ...
200 | |         const MULTIPLE_OCC     ...
...   |
226 | |     }
227 | | }
    | |_^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask
    = note: this error originates in the macro `__impl_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

changelog: [bad_bit_mask]: Fix FP on procedural macros

@rustbot
Copy link
Collaborator

rustbot commented Nov 26, 2024

r? @Jarcho

rustbot has assigned @Jarcho.
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 Nov 26, 2024
Copy link
Contributor

@Jarcho Jarcho left a comment

Choose a reason for hiding this comment

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

Thank you.

@Jarcho Jarcho added this pull request to the merge queue Nov 27, 2024
Merged via the queue into rust-lang:master with commit b4163f0 Nov 27, 2024
9 checks passed
@blyxyas blyxyas deleted the bad-bit-mask-fix branch November 27, 2024 21:12
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.

3 participants