File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,14 @@ impl<'a> DocFolder for Stripper<'a> {
3838 fn fold_item ( & mut self , i : Item ) -> Option < Item > {
3939 if i. attrs . lists ( sym:: doc) . has_word ( sym:: hidden) {
4040 debug ! ( "strip_hidden: stripping {:?} {:?}" , i. type_( ) , i. name) ;
41- // use a dedicated hidden item for given item type if any
41+ // Use a dedicated hidden item for fields, variants, and modules.
42+ // We need to keep private fields and variants, so that the docs
43+ // can show a placeholder "// some variants omitted". We need to keep
44+ // private modules, because they can contain impl blocks, and impl
45+ // block privacy is inherited from the type and trait, not from the
46+ // module it's defined in. Both of these are marked "stripped," and
47+ // not included in the final docs, but since they still have an effect
48+ // on the final doc, cannot be completely removed from the Clean IR.
4249 match * i. kind {
4350 clean:: StructFieldItem ( ..) | clean:: ModuleItem ( ..) | clean:: VariantItem ( ..) => {
4451 // We need to recurse into stripped modules to
You can’t perform that action at this time.
0 commit comments