File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -91,19 +91,21 @@ impl DocFolder for Stripper<'_, '_> {
9191
9292 if let clean:: ImportItem ( clean:: Import { source, .. } ) = & i. kind
9393 && let Some ( source_did) = source. did
94- && let Some ( import_def_id) = i. def_id ( ) . and_then ( |def_id| def_id. as_local ( ) )
9594 {
96- let reexports = reexport_chain ( self . tcx , import_def_id, source_did) ;
95+ if self . tcx . is_doc_hidden ( source_did) {
96+ return None ;
97+ } else if let Some ( import_def_id) = i. def_id ( ) . and_then ( |def_id| def_id. as_local ( ) ) {
98+ let reexports = reexport_chain ( self . tcx , import_def_id, source_did) ;
9799
98- // Check if any reexport in the chain has a hidden source
99- let has_hidden_source = reexports
100- . iter ( )
101- . filter_map ( |reexport| reexport. id ( ) )
102- . any ( |reexport_did| self . tcx . is_doc_hidden ( reexport_did) )
103- || self . tcx . is_doc_hidden ( source_did) ;
100+ // Check if any reexport in the chain has a hidden source
101+ let has_hidden_source = reexports
102+ . iter ( )
103+ . filter_map ( |reexport| reexport. id ( ) )
104+ . any ( |reexport_did| self . tcx . is_doc_hidden ( reexport_did) ) ;
104105
105- if has_hidden_source {
106- return None ;
106+ if has_hidden_source {
107+ return None ;
108+ }
107109 }
108110 }
109111
You can’t perform that action at this time.
0 commit comments