File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,18 @@ impl<'a> fold::DocFolder for Stripper<'a> {
134
134
clean:: StructItem ( ..) | clean:: EnumItem ( ..) |
135
135
clean:: TraitItem ( ..) | clean:: FunctionItem ( ..) |
136
136
clean:: VariantItem ( ..) | clean:: MethodItem ( ..) |
137
- clean:: ForeignFunctionItem ( ..) | clean:: ForeignStaticItem ( ..) |
137
+ clean:: ForeignFunctionItem ( ..) | clean:: ForeignStaticItem ( ..) => {
138
+ if ast_util:: is_local ( i. def_id ) {
139
+ if !self . exported_items . contains ( & i. def_id . node ) {
140
+ return None ;
141
+ }
142
+ // Traits are in exported_items even when they're totally private.
143
+ if i. is_trait ( ) && i. visibility != Some ( ast:: Public ) {
144
+ return None ;
145
+ }
146
+ }
147
+ }
148
+
138
149
clean:: ConstantItem ( ..) => {
139
150
if ast_util:: is_local ( i. def_id ) &&
140
151
!self . exported_items . contains ( & i. def_id . node ) {
You can’t perform that action at this time.
0 commit comments