Add test for private items

This commit is contained in:
Guillaume Gomez 2023-07-10 14:10:26 +02:00
parent 9fb6548905
commit 298cd366d5
2 changed files with 35 additions and 0 deletions

View file

@ -1553,6 +1553,9 @@ fn first_non_private(
continue;
}
if !cx.tcx.is_doc_hidden(use_def_id) &&
// We never check for "cx.render_options.document_private"
// because if a re-export is not fully public, it's never
// documented.
cx.tcx.local_visibility(local_use_def_id).is_public() {
break 'reexps;
}