mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
842f95de70
Add warn-by-default lint for visibility on `const _` declarations Add a warn-by-default `unused_visibilities` lint for visibility qualifiers on `const _` declarations—e.g. `pub const _: () = ();`. Such qualifiers have no effect. A [Sourcegraph search](https://sourcegraph.com/search?q=context:global+lang:Rust+pub%5Cs*%28%5C%28.*%5C%29%29%3F%5Cs*const%5Cs%2B_%5Cs*:&patternType=regexp&case=yes&sm=0) suggests that this pattern is relatively rare, and mostly found in tests (with only 3 exceptions). So perhaps this could become an FCW/hard error in the future. `@rustbot` label T-lang A-lints A-visibility -T-clippy