File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ use std::mem;
66use crate :: clean:: { self , Item , ItemId , ItemIdSet } ;
77use crate :: fold:: { strip_item, DocFolder } ;
88use crate :: formats:: cache:: Cache ;
9+ use crate :: visit_ast:: inherits_doc_hidden;
910use crate :: visit_lib:: RustdocEffectiveVisibilities ;
1011
1112pub ( crate ) struct Stripper < ' a , ' tcx > {
@@ -162,7 +163,12 @@ impl<'a> ImplStripper<'a, '_> {
162163 // If the "for" item is exported and the impl block isn't `#[doc(hidden)]`, then we
163164 // need to keep it.
164165 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) )
166172 } else {
167173 false
168174 }
You can’t perform that action at this time.
0 commit comments