diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-11-14 20:54:27 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-11-14 20:54:27 -0800 |
| commit | 60741e0fa0948c75040d0d554b46027021185600 (patch) | |
| tree | b52ded416b01441b9f7f415ae5d035f51911c54a | |
| parent | 4caffa8526b2d359aff853964b08aebb9683bcdb (diff) | |
| download | rust-60741e0fa0948c75040d0d554b46027021185600.tar.gz rust-60741e0fa0948c75040d0d554b46027021185600.zip | |
rustdoc: tweak stability summary counting
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).
| -rw-r--r-- | src/librustdoc/stability_summary.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustdoc/stability_summary.rs b/src/librustdoc/stability_summary.rs index b0e1aeea3a1..058d8b81f7a 100644 --- a/src/librustdoc/stability_summary.rs +++ b/src/librustdoc/stability_summary.rs @@ -146,13 +146,12 @@ fn summarize_item(item: &Item) -> (Counts, Option<ModuleSummary>) { // 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, .. }) => { |
