Uh oh!
There was an error while loading. Please reload this page.
rustdoc: Don't add extra newlines for fully opaque structs - #35667
Conversation
rust-highfive
commented
Aug 14, 2016
(rust_highfive has picked a reviewer for you, use r? to override) |
steveklabnik
commented
Aug 15, 2016
I like it, but want to talk about it with the docs team |
peschkaj
commented
Aug 17, 2016
I like this as well. |
I'm against until it adds back the |
Same as @ubsan. |
ollie27
commented
Aug 17, 2016
steveklabnik
commented
Aug 17, 2016
Concerns raised in the docs meeting:
So, we are vaguely 👍 on this idea, but have some concerns. Let's keep discussing this in-issue. |
|
ollie27
commented
Aug 17, 2016
I've fixed the case of empty braced structs. Now they're displayed as |
peschkaj
commented
Aug 19, 2016
@ollie27 could you re-render the "after" picture so we can easily look at the change? |
ollie27
commented
Aug 20, 2016
I've updated the PR message to hopefully clear things up. Sorry for causing so much confusion. |
samlh
commented
Sep 4, 2016
I like this, but would vaguely prefer pubstructVec<T>{/*...*/} |
@ollie27 we talked about this at the docs team meeting, and we like this, but would prefer this: Can you change it to that, then? We can merge after. |
Changes the definition for opaque structs to look like `pub struct Vec<T>
{ /* fields omitted */ }` to save space on the page.
Also only use one line for empty braced structs.d7c4171 to
8154a6bCompareollie27
commented
Sep 9, 2016
I've changed it to |
GuillaumeGomez
commented
Sep 9, 2016
👍 |
steveklabnik
commented
Sep 14, 2016
@bors: r+ thank you so much! |
bors
commented
Sep 14, 2016
📌 Commit 8154a6b has been approved by |
bors
commented
Sep 14, 2016
rustdoc: Don't add extra newlines for fully opaque structs
Changes the definition for braced structs with only private or hidden fields to save space on the page.
Before:
```
pub struct Vec<T> {
// some fields omitted
}
```
After:
```
pub struct Vec<T> { /* fields omitted */ }
```
This also cleans up empty braced structs.
Before:
```
pub struct Foo {
}
```
After:
```
pub struct Foo {}
```
[before](https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html) [after](https://ollie27.github.io/rust_doc_test/std/vec/struct.Vec.html)
cc #34713
Changes the definition for braced structs with only private or hidden fields to save space on the page.
Before:
After:
This also cleans up empty braced structs.
Before:
After:
beforeafter
cc #34713