-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
rustc_span: Remove unused symbols. #118456
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
As for weather this could be checked automatically in tidy, I don't think there's any easy way to do that, as it can't be answered with any text-based search. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with green CI
(and I'm sorry for your lost time ;-;)
@bors r=WaffleLapkin |
🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened. |
@bors rollup=always |
FWIW I tried this previously in #110437 Realized that I never opened a follow-up to remove just the unused symbols 😞 |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#118452 (rustdoc-search: allow spaces around `::` in path query) - rust-lang#118453 (Tweak message on ADT with private fields building) - rust-lang#118456 (rustc_span: Remove unused symbols.) - rust-lang#118458 (rustdoc: remove small from `small-section-header`) - rust-lang#118464 (Dispose llvm::TargetMachines prior to llvm::Context being disposed) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#118456 - aDotInTheVoid:unused-symbols, r=WaffleLapkin rustc_span: Remove unused symbols. As noted here, there is no guarantee that all pre-interned symbols are used. https://github.com/rust-lang/rust/blob/b10cfcd65fd7f7b1ab9beb34798b2108de003452/compiler/rustc_span/src/symbol.rs#L124-L125 This was done starting with using ripgrep to search for `sym::whatever`. I removed anything that didn't show up. However this had a huge number of false positives, due to extensive macro use. Then there was a manual phase of adding back all the ones used my macros. I don't think this was worth my time to do, but it's done now . ¯\_(ツ)_/¯
As noted here, there is no guarantee that all pre-interned symbols are used.
rust/compiler/rustc_span/src/symbol.rs
Lines 124 to 125 in b10cfcd
This was done starting with using ripgrep to search for
sym::whatever
. I removed anything that didn't show up. However this had a huge number of false positives, due to extensive macro use. Then there was a manual phase of adding back all the ones used my macros.I don't think this was worth my time to do, but it's done now . ¯_(ツ)_/¯