-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Remove unused symbols and diagnostic items #104383
Conversation
please, please, don't match on `Symbol::as_str`s, every time you do, somewhere in the world another waffle becomes sad...
r? @eholk (rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
@rustbot label -T-libs |
r? @compiler-errors @bors r+ rollup |
Shouldn't this get a perf run? Removing symbols from the pre-interned list can impact performance. |
…iaskrgr Rollup of 13 pull requests Successful merges: - rust-lang#103842 (Adding Fuchsia compiler testing script, docs) - rust-lang#104354 (Remove leading newlines from `NonZero*` doc examples) - rust-lang#104372 (Update compiler-builtins) - rust-lang#104380 (rustdoc: remove unused CSS `code { opacity: 1 }`) - rust-lang#104381 (Remove dead NoneError diagnostic handling) - rust-lang#104383 (Remove unused symbols and diagnostic items) - rust-lang#104391 (Deriving cleanups) - rust-lang#104403 (Specify language of code comment to generate document) - rust-lang#104404 (Fix missing minification for static files) - rust-lang#104413 ([llvm-wrapper] adapt for LLVM API change) - rust-lang#104415 (rustdoc: fix corner case in search keyboard commands) - rust-lang#104422 (Fix suggest associated call syntax) - rust-lang#104426 (Add test for rust-lang#102154) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…r=compiler-errors Readd the matches_macro diag item This is now used by Clippy r? `@compiler-errors` This was removed in rust-lang#104383. But in the meantime Clippy now makes use of it https://github.com/rust-lang/rust-clippy/blob/dac600e32fce89cb4b05ae6edb0c47982b99eb48/clippy_lints/src/manual_is_ascii_check.rs#L153 --- This is blocking the Clippy sync. (kinda. I could work around it, but I don't want to play ping-pong with this change.)
As the title suggests, this removes unused symbols from
sym::
and#[rustc_diagnostic_item]
annotations that weren't mentioned anywhere.Originally I tried to use grep, to find symbols and item names that are never mentioned via
sym::name
, however this produced a lot of false positives (?), for example clippy matching onSymbol::as_str
or macros "implicitly" addingsym::
. I ended up fixing all these false positives (?) by hand, but tbh I'm not sure if it was worth it...