rustdoc: Don't add extra newlines for fully opaque structs
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.
This commit is contained in:
parent
ea45edf0ee
commit
8154a6bc69
2 changed files with 25 additions and 6 deletions
|
|
@ -48,3 +48,13 @@ pub enum Qux {
|
|||
// @has - //pre "// some fields omitted"
|
||||
},
|
||||
}
|
||||
|
||||
// @has structfields/struct.Baz.html //pre "pub struct Baz { /* fields omitted */ }"
|
||||
pub struct Baz {
|
||||
x: u8,
|
||||
#[doc(hidden)]
|
||||
pub y: u8,
|
||||
}
|
||||
|
||||
// @has structfields/struct.Quux.html //pre "pub struct Quux {}"
|
||||
pub struct Quux {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue