Rollup merge of #49465 - ollie27:rustbuild_test_docs, r=steveklabnik,QuietMisdreavus,frewsxcv,GuillaumeGomez

Add docs for the test crate with the std docs

If the compiler docs aren't going to include the test crate then it may as well be included with std.

Fixes #49388
This commit is contained in:
kennytm
2018-04-14 15:22:17 +08:00
+4 -1
View File
@@ -514,7 +514,7 @@ impl Step for Test {
fn should_run(run: ShouldRun) -> ShouldRun {
let builder = run.builder;
run.krate("test").default_condition(builder.config.compiler_docs)
run.krate("test").default_condition(builder.build.config.docs)
}
fn make_run(run: RunConfig) {
@@ -557,6 +557,9 @@ fn run(self, builder: &Builder) {
let mut cargo = builder.cargo(compiler, Mode::Libtest, target, "doc");
compile::test_cargo(build, &compiler, target, &mut cargo);
cargo.arg("--no-deps").arg("-p").arg("test");
build.run(&mut cargo);
build.cp_r(&my_out, &out);
}