-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 code #77739
Remove unused code #77739
Conversation
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
See also #77740 |
52512cd
to
ed0d9fc
Compare
Network hickup. @bors retry |
Nevermind, wrong PR. Meant #77690 instead. |
r=me on everything in rustc_(ast,errors,expand,hir,hir_pretty,lint,metadata,parse,session,span). I'd suggest to make sure this doesn't break clippy/rls/etc though, by doing textual search on the repo (together with all the submodules) for the removed entities. |
I made a textual search for most things, yes, already because warnalyzer has tons of false positives. As a result, some things I didn't include in this PR. Some names are highly non-unique though, so I didn't verify it with a search for all of them. To be really sure, I just enabled |
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.
I checked the changes in |
ed0d9fc
to
439f2d6
Compare
I think this looks good to merge once the |
☔ The latest upstream changes (presumably #77867) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
439f2d6
to
fc30e7e
Compare
☔ The latest upstream changes (presumably #77917) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
fc30e7e
to
215cd36
Compare
@@ -467,23 +462,6 @@ impl Generics<'hir> { | |||
} | |||
} | |||
|
|||
pub fn own_counts(&self) -> GenericParamCount { |
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.
Ah, I'm glad to see this go.
@bors r=petrochenkov,varkor |
📌 Commit 215cd36 has been approved by |
🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened |
Rollup of 9 pull requests Successful merges: - rust-lang#77570 (Allow ascii whitespace char for doc aliases ) - rust-lang#77739 (Remove unused code) - rust-lang#77753 (Check html comments) - rust-lang#77879 (Provide better documentation and help messages for x.py setup) - rust-lang#77902 (Include aarch64-pc-windows-msvc in the dist manifests) - rust-lang#77934 (Document -Z codegen-backend in the unstable book) - rust-lang#77936 (Remove needless alloc_slice) - rust-lang#77946 (Validate references to source scopes) - rust-lang#77951 (Update books) Failed merges: r? `@ghost`
Remove (lots of) dead code Builds on - [ ] rust-lang#83161 - [x] rust-lang#83230 - [x] rust-lang#83197. Found with https://github.com/est31/warnalyzer. See rust-lang#77739 for a similar change in the past. Dubious changes: - Maybe some of the dead code in rustc_data_structures should be kept, in case someone wants to use it in the future? TODO: - [ ] check if any of the comments on the deleted code should be kept. - [x] update the compiler documentation; right now it fails to build - [x] finish moving `cfg(test)` changes into rust-lang#83197 cc `@est31`
Remove (lots of) dead code Builds on - [ ] rust-lang/rust#83161 - [x] rust-lang/rust#83230 - [x] rust-lang/rust#83197. Found with https://github.com/est31/warnalyzer. See rust-lang/rust#77739 for a similar change in the past. Dubious changes: - Maybe some of the dead code in rustc_data_structures should be kept, in case someone wants to use it in the future? TODO: - [ ] check if any of the comments on the deleted code should be kept. - [x] update the compiler documentation; right now it fails to build - [x] finish moving `cfg(test)` changes into rust-lang/rust#83197 cc `@est31`
Rustc has a builtin lint for detecting unused code inside a crate, but when an item is marked
pub
, the code, even if unused inside the entire workspace, is never marked as such. Therefore, I've built warnalyzer to detect unused items in a cross-crate setting.Closes est31/warnalyzer#2