-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
extra_unused_type_parameters should not warn external macros #10318
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Comments
taiki-e
added
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
labels
Feb 11, 2023
MingweiSamuel
added a commit
to MingweiSamuel/hydroflow
that referenced
this issue
Feb 14, 2023
This is still triggering on the latest nightly (I did The linted-on code is #[repr(C)]
#[derive(Zeroable, Pod, Clone, Copy)]
pub struct O65FixedHeader {
id1: [u8; 2],
magic: [u8; 3],
ver: u8,
mode: u16,
} Which triggers this output
IMO, I'm suspicious this should trigger on macro-expanded tokens at all, given that a common technique to typecheck some type against a trait is to define |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
extra_unused_type_parameters currently warns of code generated by external macros, but it should not. (there is no way for the user to fix it.)
Mentioning @mkrasnitski who implemented this lint in #10028.
Lint Name
extra_unused_type_parameters
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen: no warnings
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: