Skip to content

Commit d29afe2

Browse files
Add support for --document-hidden-items in first_non_private
1 parent 298cd36 commit d29afe2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1552,7 +1552,8 @@ fn first_non_private(
15521552
if let Res::Def(DefKind::Ctor(..), _) | Res::SelfCtor(..) = res {
15531553
continue;
15541554
}
1555-
if !cx.tcx.is_doc_hidden(use_def_id) &&
1555+
if (cx.render_options.document_hidden ||
1556+
!cx.tcx.is_doc_hidden(use_def_id)) &&
15561557
// We never check for "cx.render_options.document_private"
15571558
// because if a re-export is not fully public, it's never
15581559
// documented.

0 commit comments

Comments
 (0)