]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #37890 - eddyb:rustdoc-1, r=nrc
authorbors <bors@rust-lang.org>
Thu, 24 Nov 2016 06:26:44 +0000 (00:26 -0600)
committerGitHub <noreply@github.com>
Thu, 24 Nov 2016 06:26:44 +0000 (00:26 -0600)
rustdoc: separate test collection from the main "clean"-ing pipeline.

While reusing the documentation "clean"-ing infrastructure for collecting code examples to test may have seemed appealing at some point, doing the same through a HIR visitor is barely any harder.
At the same time, supporting both "regular documentation" and "test collection" modes in `rustdoc::clean` has its cost, requiring any use of a `TyCtxt` to be speculative, and provide some sort of fallback.

This simplification is the first step towards bringing rustdoc closer to the compiler, and perhaps even unifying the "local crate" (based on the HIR AST) and "inlinined across crates" (based on crate metadata and typesystem information) implementations of rustdoc.

Sadly, not all possible changes to rustdoc will be uncontroversial, so I'm starting small with this patch.


Trivial merge