File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ use std::mem;
6
6
use crate :: clean:: { self , Item , ItemId , ItemIdSet } ;
7
7
use crate :: fold:: { strip_item, DocFolder } ;
8
8
use crate :: formats:: cache:: Cache ;
9
+ use crate :: visit_ast:: inherits_doc_hidden;
9
10
use crate :: visit_lib:: RustdocEffectiveVisibilities ;
10
11
11
12
pub ( crate ) struct Stripper < ' a , ' tcx > {
@@ -162,7 +163,12 @@ impl<'a> ImplStripper<'a, '_> {
162
163
// If the "for" item is exported and the impl block isn't `#[doc(hidden)]`, then we
163
164
// need to keep it.
164
165
self . cache . effective_visibilities . is_exported ( self . tcx , for_def_id)
165
- && !item. is_doc_hidden ( )
166
+ && ( ( !item. is_doc_hidden ( )
167
+ && for_def_id
168
+ . as_local ( )
169
+ . map ( |def_id| !inherits_doc_hidden ( self . tcx , def_id, None ) )
170
+ . unwrap_or ( true ) )
171
+ || self . cache . inlined_items . contains ( & for_def_id) )
166
172
} else {
167
173
false
168
174
}
You can’t perform that action at this time.
0 commit comments