-
Notifications
You must be signed in to change notification settings - Fork 1.7k
integer_arithmetic
triggers in derive macro code
#10185
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
Labels
C-bug
Category: Clippy is not doing the correct thing
Comments
This needs |
nagisa
added a commit
to rust-fuzz/arbitrary
that referenced
this issue
Jan 20, 2023
Lack of this can trigger lints in `clippy` such as rust-lang/rust-clippy#10185 with no obvious way to allow this lint for the generated impl specifically. It is a good style and hygiene to add this attribute anyhhow.
nagisa
added a commit
to rust-fuzz/arbitrary
that referenced
this issue
Jan 23, 2023
Lack of this can trigger lints in `clippy` such as rust-lang/rust-clippy#10185 with no obvious way to allow this lint for the generated impl specifically. It is a good style and hygiene to add this attribute anyhhow.
This was referenced Mar 28, 2023
bors bot
pushed a commit
to sigp/lighthouse
that referenced
this issue
Mar 28, 2023
## Proposed Changes To prevent breakages from `cargo update`, this updates the `arbitrary` crate to a new commit from my fork. Unfortunately we still need to use my fork (even though my `bound` change was merged) because of this issue: rust-lang/rust-clippy#10185. In a couple of Rust versions it should be resolved upstream.
ghost
pushed a commit
to oone-world/lighthouse
that referenced
this issue
Jul 13, 2023
## Proposed Changes To prevent breakages from `cargo update`, this updates the `arbitrary` crate to a new commit from my fork. Unfortunately we still need to use my fork (even though my `bound` change was merged) because of this issue: rust-lang/rust-clippy#10185. In a couple of Rust versions it should be resolved upstream.
Woodpile37
pushed a commit
to Woodpile37/lighthouse
that referenced
this issue
Jan 6, 2024
To prevent breakages from `cargo update`, this updates the `arbitrary` crate to a new commit from my fork. Unfortunately we still need to use my fork (even though my `bound` change was merged) because of this issue: rust-lang/rust-clippy#10185. In a couple of Rust versions it should be resolved upstream.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
The
integer_arithmetic
lint triggers in code generated by derive macros.It seems this is a slightly broader issue affecting multiple lints, e.g. #9657, #7845.
If the right solution is to check
any_parent_is_automatically_derived
orin_external_macro
I would be happy to do the implementation forinteger_arithmetic
.Reproducer
I tried this code with
arbitrary@1.2.2
:The error is:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: