Skip to content

Commit 2344c6c

Browse files
committed
rustdoc: Fix hiding of private fields
The calculation for whether a field is public or private was tweaked in #13184, but I forgot to update rustdoc. Closes #13310
1 parent 46e6194 commit 2344c6c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/librustdoc/passes.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,12 @@ impl<'a> fold::DocFolder for Stripper<'a> {
128128
}
129129
}
130130

131-
clean::ViewItemItem(..) => {
131+
clean::ViewItemItem(..) | clean::StructFieldItem(..) => {
132132
if i.visibility != Some(ast::Public) {
133133
return None
134134
}
135135
}
136136

137-
clean::StructFieldItem(..) => {
138-
if i.visibility == Some(ast::Private) {
139-
return None;
140-
}
141-
}
142-
143137
// handled below
144138
clean::ModuleItem(..) => {}
145139

0 commit comments

Comments
 (0)