Skip to content

Conversation

GuillaumeGomez
Copy link
Member

Currently, the empty impl blocks have toggles:

Screenshot from 2021-04-27 15-15-03

So when you expand it, nothing happens:

Screenshot from 2021-04-27 15-15-07

So now, in case the impl block is empty, we simply don't generate the details/summary wrapping (which also makes DOM lighter, yeay!):

Screenshot from 2021-04-27 15-14-15

r? @jsha

@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: Rustdoc UI (generated HTML) labels Apr 27, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 27, 2021
@jsha
Copy link
Contributor

jsha commented Apr 28, 2021

Nice fix! Thanks for doing it.

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 28, 2021

📌 Commit 9051d40 has been approved by jsha

@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 28, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 28, 2021
Rollup of 5 pull requests

Successful merges:

 - rust-lang#84529 (Improve coverage spans for chained function calls)
 - rust-lang#84616 (Fix empty dom toggle)
 - rust-lang#84622 (Make traits with GATs not object safe)
 - rust-lang#84624 (Make sentence in env::args_os' docs plain and simple)
 - rust-lang#84642 (Stabilize vec_extend_from_within)

Failed merges:

 - rust-lang#84636 (rustdoc: change aliases attribute to data-aliases)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 54ad5cb into rust-lang:master Apr 28, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 28, 2021
@GuillaumeGomez GuillaumeGomez deleted the fix-empty-dom-toggle branch April 28, 2021 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) 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.

5 participants