File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -760,6 +760,11 @@ impl Item {
760760 }
761761 } )
762762 . collect ( ) ;
763+
764+ if !keep_as_is && self . is_doc_hidden ( ) {
765+ attrs. push ( "#[doc(hidden)]" . into ( ) ) ;
766+ }
767+
763768 if !keep_as_is
764769 && let Some ( def_id) = self . def_id ( )
765770 && let ItemType :: Struct | ItemType :: Enum | ItemType :: Union = self . type_ ( )
@@ -822,6 +827,7 @@ impl Item {
822827 attrs. push ( format ! ( "#[repr({})]" , out. join( ", " ) ) ) ;
823828 }
824829 }
830+
825831 attrs
826832 }
827833
Original file line number Diff line number Diff line change @@ -1610,14 +1610,7 @@ pub(crate) fn visibility_print_with_space<'a, 'tcx: 'a>(
16101610 }
16111611 } ;
16121612
1613- let is_doc_hidden = item. is_doc_hidden ( ) ;
1614- display_fn ( move |f| {
1615- if is_doc_hidden {
1616- f. write_str ( "#[doc(hidden)] " ) ?;
1617- }
1618-
1619- f. write_str ( & vis)
1620- } )
1613+ display_fn ( move |f| f. write_str ( & vis) )
16211614}
16221615
16231616pub ( crate ) trait PrintWithSpace {
You can’t perform that action at this time.
0 commit comments