Add unused pre-interned symbols tidy check#110437
Add unused pre-interned symbols tidy check#110437DaniPopes wants to merge 2 commits intorust-lang:masterfrom
Conversation
|
r? @ozkanonur (rustbot has picked a reviewer for you, use r? to override) |
|
I agree that this tidy check is more effort than it's worth and we shouldn't add it. |
I agree also. cc @rust-lang/bootstrap |
|
This feels like too much effort for something that seems (at a first glance) quite brittle. |
|
I think t-compiler should make the decision here. Tidy is ultimately for their benefit, I don't think we're in a good position to decide how useful this check is. That said Nils is on t-compiler, so I'm comfortable closing this. Separately, @DaniPopes are you interested in making a one time PR that removes the unused symbols with no other changes? That seems to me like a good cleanup and not a maintenance burden. |
Adds a tidy check that checks for unused pre-interned symbols, inspired by the comment in
rustc_span::symbol.This checks for
sym::*references, which results in 35 unused symbols, although of these are commonly used even if not explicitly referred to, likeFutureorCString, with very few being actually unused.When adding new symbols to the pre-intern list, they must also be added to an ignore list to pass this check if they are not explicitly referenced as
sym::*anywhere in the compiler.I personally don't think it's worth having this extra maintenance burden, but I'm opening this PR anyway for others' opinions on the matter, and for future reference.