Skip to content

Commit ec337b6

Browse files
committed
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.
1 parent 0a2e9ad commit ec337b6

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/librustdoc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ where R: 'static + Send, F: 'static + Send + FnOnce(Output) -> R {
470470
default_passes = false;
471471

472472
passes = vec![
473-
String::from("strip-hidden"),
474473
String::from("collapse-docs"),
475474
String::from("unindent-comments"),
476475
];

src/test/rustdoc/issue-46380.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// compile-flags: --document-private-items
12+
13+
// @has issue_46380/struct.Hidden.html
14+
#[doc(hidden)]
15+
pub struct Hidden;

0 commit comments

Comments
 (0)