Skip to content

Shorten html::render - #82088

Merged
bors merged 5 commits into
rust-lang:masterfrom
Nicholas-Baron:shorten_html_render
Mar 5, 2021
Merged

Shorten html::render#82088
bors merged 5 commits into
rust-lang:masterfrom
Nicholas-Baron:shorten_html_render

Conversation

@Nicholas-Baron

@Nicholas-BaronNicholas-Baron commented Feb 14, 2021

Copy link
Copy Markdown
Contributor

The mod.rs for librustdoc's html::render was over 3,000 lines. This PR reduces it to around 2,300 by

  1. Moving Context and associated impls to a separate file
  2. Moving the print_item function and its helpers to a separate file
  3. Moving write_shared and write_minify to their own file

Related to issue #60302.
Edit 1: SharedContext and related impls is only 72 lines and so will not be moved.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @ollie27

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 14, 2021
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@jyn514

Copy link
Copy Markdown
Member

r? @GuillaumeGomez

@jyn514jyn514 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. labels Feb 16, 2021
Comment threadsrc/librustdoc/html/render/shared_context.rs Outdated
Comment threadsrc/librustdoc/html/render/context.rs Outdated
@Nicholas-Baron
Nicholas-Baronforce-pushed the shorten_html_render branch 2 times, most recently from 989fadb to 5273ca8CompareFebruary 16, 2021 22:01
@bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors

This comment has been minimized.

@jyn514

Copy link
Copy Markdown
Member

@GuillaumeGomez this bitrots quickly, it would be nice to review it soon if possible.

@rust-log-analyzer

This comment has been minimized.

@Nicholas-Baron

Copy link
Copy Markdown
ContributorAuthor

The job mingw-check failed! Check out the build log: (web)(plain)

Click to see the possible cause of the failure (guessed by this bot)

The warning is regarding a is_dummy function in src/librustdoc/clean/types.rs. This file is not modified in this PR and I can find no place where it is used in the code touched by this PR and so I will not touch it, in the hope that some other PR fixes the issue.

@bors

This comment has been minimized.

@bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors

This comment has been minimized.

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 4, 2021
@bors

bors commented Mar 4, 2021

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #82756) made this pull request unmergeable. Please resolve the merge conflicts.

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 4, 2021
@jyn514

Copy link
Copy Markdown
Member

@bors delegate=Nicholas-Baron

This bitrots pretty quickly, so feel free to approve it yourself once you've fixed the conflict. Please use r=GuillaumeGomez and wait until CI passes on the PR first.

@bors

bors commented Mar 4, 2021

Copy link
Copy Markdown
Collaborator

✌️ @Nicholas-Baron can now approve this pull request

@Nicholas-Baron

Copy link
Copy Markdown
ContributorAuthor

@bors: r=GuillaumeGomez

@bors

bors commented Mar 4, 2021

Copy link
Copy Markdown
Collaborator

📌 Commit afb8220 has been approved by GuillaumeGomez

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 4, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 5, 2021
… r=GuillaumeGomez
Shorten html::render
The `mod.rs` for librustdoc's `html::render` was over 3,000 lines. This PR reduces it to around 2,300 by
1. Moving `Context` and associated `impl`s to a separate file
2. Moving the `print_item` function and its helpers to a separate file
3. Moving `write_shared` and `write_minify` to their own file
Related to issue rust-lang#60302.
Edit 1: `SharedContext` and related `impl`s is only 72 lines and so will not be moved.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Mar 5, 2021
… r=GuillaumeGomez
Shorten html::render
The `mod.rs` for librustdoc's `html::render` was over 3,000 lines. This PR reduces it to around 2,300 by
1. Moving `Context` and associated `impl`s to a separate file
2. Moving the `print_item` function and its helpers to a separate file
3. Moving `write_shared` and `write_minify` to their own file
Related to issue rust-lang#60302.
Edit 1: `SharedContext` and related `impl`s is only 72 lines and so will not be moved.
@JohnTitorJohnTitor mentioned this pull request Mar 5, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 5, 2021
…laumeGomez
Rollup of 5 pull requests
Successful merges:
- rust-lang#76716 (Don't warn for `missing_doc_examples` when item is #[doc(hidden)])
- rust-lang#82088 (Shorten html::render)
- rust-lang#82690 (Update rustdoc documentation)
- rust-lang#82752 (Add a regression test for issue-81712)
- rust-lang#82765 (Fix polymorphization ICE on associated types in trait decls using const generics in bounds)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Mar 5, 2021
… r=GuillaumeGomez
Shorten html::render
The `mod.rs` for librustdoc's `html::render` was over 3,000 lines. This PR reduces it to around 2,300 by
1. Moving `Context` and associated `impl`s to a separate file
2. Moving the `print_item` function and its helpers to a separate file
3. Moving `write_shared` and `write_minify` to their own file
Related to issue rust-lang#60302.
Edit 1: `SharedContext` and related `impl`s is only 72 lines and so will not be moved.
@m-ou-sem-ou-se mentioned this pull request Mar 5, 2021
@bors
bors merged commit 2f28361 into rust-lang:masterMar 5, 2021
@rustbotrustbot added this to the 1.52.0 milestone Mar 5, 2021
@Nicholas-Baron
Nicholas-Baron deleted the shorten_html_render branch March 5, 2021 23:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-cleanupCategory: PRs that clean code up or issues documenting cleanup.S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-rustdocRelevant 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.

8 participants

@Nicholas-Baron@rust-highfive@rust-log-analyzer@jyn514@bors@GuillaumeGomez@ollie27@rustbot