diff options
| author | Oliver Middleton <olliemail27@gmail.com> | 2016-08-14 18:01:25 +0100 | 
|---|---|---|
| committer | Oliver Middleton <olliemail27@gmail.com> | 2016-09-09 01:41:42 +0100 | 
| commit | 8154a6bc69b42813ffda91adcefd9f277338acf3 (patch) | |
| tree | c495e55fea99a709cc1d1c2a5e7532ab707cdd1c /src/test/rustdoc/structfields.rs | |
| parent | ea45edf0ee39fd7f25e0ba7258023c81b53b3a0d (diff) | |
| download | rust-8154a6bc69b42813ffda91adcefd9f277338acf3.tar.gz rust-8154a6bc69b42813ffda91adcefd9f277338acf3.zip | |
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.
Diffstat (limited to 'src/test/rustdoc/structfields.rs')
| -rw-r--r-- | src/test/rustdoc/structfields.rs | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/src/test/rustdoc/structfields.rs b/src/test/rustdoc/structfields.rs index c0bfe3ffe3c..75d9be856d7 100644 --- a/src/test/rustdoc/structfields.rs +++ b/src/test/rustdoc/structfields.rs @@ -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 {} | 
