Skip to content

Commit

Permalink
rustdoc: Fix hiding of private fields
Browse files Browse the repository at this point in the history
The calculation for whether a field is public or private was tweaked in #13184,
but I forgot to update rustdoc.

Closes #13310
  • Loading branch information
alexcrichton committed Apr 4, 2014
1 parent 46e6194 commit 2344c6c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/librustdoc/passes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,12 @@ impl<'a> fold::DocFolder for Stripper<'a> {
}
}

clean::ViewItemItem(..) => {
clean::ViewItemItem(..) | clean::StructFieldItem(..) => {
if i.visibility != Some(ast::Public) {
return None
}
}

clean::StructFieldItem(..) => {
if i.visibility == Some(ast::Private) {
return None;
}
}

// handled below
clean::ModuleItem(..) => {}

Expand Down

9 comments on commit 2344c6c

@bors
Copy link
Contributor

@bors bors commented on 2344c6c Apr 5, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at alexcrichton@2344c6c

@bors
Copy link
Contributor

@bors bors commented on 2344c6c Apr 5, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging alexcrichton/rust/rustdoc-fields = 2344c6c into auto

@bors
Copy link
Contributor

@bors bors commented on 2344c6c Apr 5, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alexcrichton/rust/rustdoc-fields = 2344c6c merged ok, testing candidate = d54d56a3

@bors
Copy link
Contributor

@bors bors commented on 2344c6c Apr 5, 2014

@bors
Copy link
Contributor

@bors bors commented on 2344c6c Apr 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at alexcrichton@2344c6c

@bors
Copy link
Contributor

@bors bors commented on 2344c6c Apr 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging alexcrichton/rust/rustdoc-fields = 2344c6c into auto

@bors
Copy link
Contributor

@bors bors commented on 2344c6c Apr 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alexcrichton/rust/rustdoc-fields = 2344c6c merged ok, testing candidate = 4e9e259

@bors
Copy link
Contributor

@bors bors commented on 2344c6c Apr 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 2344c6c Apr 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 4e9e259

Please sign in to comment.