From 8154a6bc69b42813ffda91adcefd9f277338acf3 Mon Sep 17 00:00:00 2001 From: Oliver Middleton Date: Sun, 14 Aug 2016 18:01:25 +0100 Subject: rustdoc: Don't add extra newlines for fully opaque structs Changes the definition for opaque structs to look like `pub struct Vec { /* fields omitted */ }` to save space on the page. Also only use one line for empty braced structs. --- src/test/rustdoc/structfields.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/test/rustdoc/structfields.rs') 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 {} -- cgit 1.4.1-3-g733a5