about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2017-11-30 21:18:00 +0100
committerChristian Duerr <contact@christianduerr.com>2017-11-30 21:18:00 +0100
commitec337b613ec5519a54f2948f9d8b7beea5cba86b (patch)
tree81b357ddc17748c57dfe14555e75239e86c68f3e
parent0a2e9ade83ff253bb489c63a95b1f499c5e0916f (diff)
downloadrust-ec337b613ec5519a54f2948f9d8b7beea5cba86b.tar.gz
rust-ec337b613ec5519a54f2948f9d8b7beea5cba86b.zip
Show hidden items with rustdoc's document-private
When using `#[doc(hidden)]` elements are hidden from docs even when the
rustdoc flag `--document-private-items` is set.

This behavior has been changed to display all hidden items when the flag
is active.
-rw-r--r--src/librustdoc/lib.rs1
-rw-r--r--src/test/rustdoc/issue-46380.rs15
2 files changed, 15 insertions, 1 deletions
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index fcb25f7aef3..967076779ad 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -470,7 +470,6 @@ where R: 'static + Send, F: 'static + Send + FnOnce(Output) -> R {
         default_passes = false;
 
         passes = vec![
-            String::from("strip-hidden"),
             String::from("collapse-docs"),
             String::from("unindent-comments"),
         ];
diff --git a/src/test/rustdoc/issue-46380.rs b/src/test/rustdoc/issue-46380.rs
new file mode 100644
index 00000000000..85f29ec4b02
--- /dev/null
+++ b/src/test/rustdoc/issue-46380.rs
@@ -0,0 +1,15 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: --document-private-items
+
+// @has issue_46380/struct.Hidden.html
+#[doc(hidden)]
+pub struct Hidden;