Skip to content
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

rustdoc: Don't generate blanket impls when running --show-coverage #84030

Merged
merged 2 commits into from
Apr 9, 2021

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Apr 9, 2021

get_blanket_impls is the slowest part of rustdoc, and the coverage pass
completely ignores blanket impls. This stops running it at all, and also
removes some unnecessary checks in calculate_doc_coverage that ignored
the impl anyway.

We don't currently measure --show-coverage in perf.rlo, but I tested
this locally on cargo and it brought the time down from 2.9 to 1.6
seconds.

This also adds back a commented-out test; Rustdoc has been able to deal with impl trait for almost a year now.

r? @GuillaumeGomez

get_blanket_impls is the slowest part of rustdoc, and the coverage pass
completely ignores blanket impls. This stops running it at all, and also
removes some unnecessary checks in `calculate_doc_coverage` that ignored
the impl anyway.

We don't currently measure --show-coverage in perf.rlo, but I tested
this locally on cargo and it brought the time down from 2.9 to 1.6
seconds.
Rustdoc has been able to deal with `impl trait` for almost a year now.
@jyn514 jyn514 added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. I-compiletime Issue: Problems and improvements with respect to compile times. labels Apr 9, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 9, 2021
@GuillaumeGomez
Copy link
Member

Nice, thanks! r=me once CI pass.

@jyn514
Copy link
Member Author

jyn514 commented Apr 9, 2021

@bors r=GuillaumeGomez

@bors
Copy link
Contributor

bors commented Apr 9, 2021

📌 Commit f67103b has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 9, 2021
@bors
Copy link
Contributor

bors commented Apr 9, 2021

⌛ Testing commit f67103b with merge e43c200...

@bors
Copy link
Contributor

bors commented Apr 9, 2021

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing e43c200 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 9, 2021
@bors bors merged commit e43c200 into rust-lang:master Apr 9, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 9, 2021
@jyn514 jyn514 deleted the no-blanket-impls branch April 9, 2021 17:00
@camelid camelid added the A-doc-coverage Area: Calculating how much of a crate has documentation label Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-doc-coverage Area: Calculating how much of a crate has documentation C-cleanup Category: PRs that clean code up or issues documenting cleanup. I-compiletime Issue: Problems and improvements with respect to compile times. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants