File tree 1 file changed +12
-10
lines changed
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<'_, '_> {
91
91
92
92
if let clean:: ImportItem ( clean:: Import { source, .. } ) = & i. kind
93
93
&& let Some ( source_did) = source. did
94
- && let Some ( import_def_id) = i. def_id ( ) . and_then ( |def_id| def_id. as_local ( ) )
95
94
{
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) ;
97
99
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) ) ;
104
105
105
- if has_hidden_source {
106
- return None ;
106
+ if has_hidden_source {
107
+ return None ;
108
+ }
107
109
}
108
110
}
109
111
You can’t perform that action at this time.
0 commit comments