Skip to content

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Jun 8, 2021

This allows for a more readable straight-through logic in render_impl without need for a closure.

I think this will make #85970 a bit more of a straightforward change.

This is a pure refactoring. I've verified that the output of x.py doc library/std is byte-for-byte identical.

r? @GuillaumeGomez

This allows for a more readable straight-through logic in render_impl
without need for a closure.
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 8, 2021
@jsha jsha added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jun 8, 2021
@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+

@bors
Copy link
Collaborator

bors commented Jun 8, 2021

📌 Commit 1c0ecd4 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 Jun 8, 2021
write!(
w,
"<div id=\"{}\" class=\"impl has-srclink\"{}>\
<code class=\"in-band\">{}</code>",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raw strings could make this more readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, thanks! I think we use non-raw strings in rustdoc to minimize whitespace (by putting \ at the end of the line). Also, I hope to introduce the use of a templating engine soonish, which would make things even more readable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm that we don't use raw strings to generate smaller content.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 9, 2021
Rollup of 11 pull requests

Successful merges:

 - rust-lang#85676 (Fix documentation style inconsistencies for IP addresses)
 - rust-lang#85715 (Document `From` impls in string.rs)
 - rust-lang#85791 (Add `Ipv6Addr::is_unicast`)
 - rust-lang#85957 (Display defaults on const params- rustdoc )
 - rust-lang#85982 (Enable rustdoc to document safe wasm intrinsics)
 - rust-lang#86121 (Forwarding implementation for Seek trait's stream_position method)
 - rust-lang#86124 (Include macro name in 'local ambiguity' error)
 - rust-lang#86128 (Refactor: Extract render_summary from render_impl.)
 - rust-lang#86142 (Simplify proc_macro code using Bound::cloned().)
 - rust-lang#86158 (Update books)
 - rust-lang#86159 (Update cargo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e163e3c into rust-lang:master Jun 9, 2021
@rustbot rustbot added this to the 1.54.0 milestone Jun 9, 2021
@jsha jsha deleted the render-impl-into-mod branch June 10, 2021 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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