Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upWarn about lints that are disabled but not currently activated #39958
Comments
This comment has been minimized.
This comment has been minimized.
sanmai-NL
commented
Feb 19, 2017
•
|
Interesting idea, but what makes such an attribute unnecessary? |
This comment has been minimized.
This comment has been minimized.
Presumably because the existence of the attribute in that particular scenario doesn't result in any fewer warnings upon compilation. |
This comment has been minimized.
This comment has been minimized.
sanmai-NL
commented
Feb 20, 2017
•
|
@frewsxcv: yeah, but that context may (likely will) change between compilation runs. I would expect the programmer to put those lint check attributes in with a reason. In general, it is wise/good to check for unneeded |
sanxiyn
added
the
A-lint
label
Feb 21, 2017
This comment has been minimized.
This comment has been minimized.
|
This was also discussed in internals.rust-lang.org: Warning about disabled lints that don't need disabling? |
johnthagen commentedFeb 19, 2017
It would be nice if
rustccould catch an unnecessary use of#[allow(unused_variables)]:Often times
#[allow(unused_variables)]is added during development and later should be removed after all parameters are in use so that it doesn't mask a real warning in the future.Originally this was brought up as a lint for
clippy(rust-lang/rust-clippy#1552) but was directed here becauseclippydoes not handleallow/warn/denyitself.