]> git.lizzy.rs Git - rust.git/commit
rustdoc: Fill in external trait methods
authorAlex Crichton <alex@alexcrichton.com>
Sat, 3 May 2014 09:08:58 +0000 (02:08 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 22 May 2014 16:46:22 +0000 (09:46 -0700)
commitc746c503f0bb0ba27e5ee6170a85d03013d3ac1c
treef5cebee6bbac91e51544d52449a9484fdcdb8565
parent9411cec580932f38e0e017245ce28ad2ff8e936c
rustdoc: Fill in external trait methods

This commit alters rustdoc to crawl the metadata of upstream libraries in order
to fill in default methods for traits implemented in downstream crates. This,
for example, documents the `insert` function on hash maps.

This is a fairly lossy extraction from the metadata. Documentation and
attributes are lost, but they aren't used anyway. Unfortunately, argument names
are also lost because they are not present in the metadata. Source links are
also lost because the spans are not serialized.

While not perfect, it appears that presenting this documentation through rustdoc
is much better than nothing, so I wanted to land this to allow iteration on it
later on.
src/librustdoc/clean.rs
src/librustdoc/core.rs
src/librustdoc/fold.rs
src/librustdoc/html/format.rs
src/librustdoc/html/render.rs
src/librustdoc/passes.rs
src/librustdoc/test.rs