]> git.lizzy.rs Git - rust.git/commit
rustdoc: revise method counts in stability summary
authorAaron Turon <aturon@mozilla.com>
Mon, 10 Nov 2014 23:33:21 +0000 (15:33 -0800)
committerAaron Turon <aturon@mozilla.com>
Mon, 10 Nov 2014 23:36:03 +0000 (15:36 -0800)
commit5f09a50e8f5fe8cbf4ce8fed5bfd49b9e12b9aa1
tree51ff0b9652c5de986518d123d7db36992b1d339c
parent93c85eb8bdcc910a27caf6abd20207a626ae98e5
rustdoc: revise method counts in stability summary

Previously, the stability summary page attempted to associate impl
blocks with the module in which they were defined, rather than the
module defining the type they apply to (which is usually, but not
always, the same). Unfortunately, due to the basic architecture of
rustdoc, this meant that impls from re-exports were not being counted.

This commit makes the stability summary work the same way that rustdoc's
rendered output does: all methods are counted alongside the type they
apply to, no matter where the methods are defined.

In addition, for trait impl blocks only the stability of the overall
block is counted; the stability of the methods within is not
counted (since that stability level is part of the trait definition).

Fixes #18812
src/librustdoc/html/render.rs
src/librustdoc/lib.rs
src/librustdoc/stability_summary.rs