This commit slightly tweaks the counting of impl blocks and structs for
the stability summary (so that the block itself isn't counted for
inherent impls, and the fields aren't counted for structs).
// considered to have no children.
match item.inner {
// Require explicit `pub` to be visible
- StructItem(Struct { fields: ref subitems, .. }) |
ImplItem(Impl { items: ref subitems, trait_: None, .. }) => {
let subcounts = subitems.iter().filter(|i| visible(*i))
.map(summarize_item)
.map(|s| s.val0())
.fold(Counts::zero(), |acc, x| acc + x);
- (item_counts + subcounts, None)
+ (subcounts, None)
}
// `pub` automatically
EnumItem(Enum { variants: ref subitems, .. }) => {