Skip to content

Commit 73fa6d5

Browse files
committed
Remove std/test documentation from compiler docs.
1 parent 1b0e9f5 commit 73fa6d5

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

src/bootstrap/dist.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ impl Step for RustcDocs {
163163
let image = tmpdir(build).join(format!("{}-{}-image", name, host));
164164
let _ = fs::remove_dir_all(&image);
165165

166-
let dst = image.join("share/doc/rustc/html");
166+
let dst = image.join("share/doc/rust/html");
167167
t!(fs::create_dir_all(&dst));
168168
let src = build.compiler_doc_out(host);
169169
cp_r(&src, &dst);
@@ -179,7 +179,7 @@ impl Step for RustcDocs {
179179
.arg(format!("--package-name={}-{}", name, host))
180180
.arg("--component-name=rustc-docs")
181181
.arg("--legacy-manifest-dirs=rustlib,cargo")
182-
.arg("--bulk-dirs=share/doc/rustc/html");
182+
.arg("--bulk-dirs=share/doc/rust/html");
183183
build.run(&mut cmd);
184184
t!(fs::remove_dir_all(&image));
185185

src/bootstrap/doc.rs

+4-12
Original file line numberDiff line numberDiff line change
@@ -690,17 +690,10 @@ impl Step for Rustc {
690690
builder.ensure(compile::Rustc { compiler, target });
691691
let out_dir = build.stage_out(compiler, Mode::Librustc)
692692
.join(target).join("doc");
693-
694-
// See docs in std above for why we symlink
695-
//
696-
// This step must happen after other documentation steps. This
697-
// invariant ensures that compiler documentation is not included
698-
// in the standard documentation tarballs but that all the
699-
// documentation from the standard documentation tarballs is included
700-
// in the compiler documentation tarball.
701-
let my_out = build.crate_doc_out(target);
702-
build.clear_if_dirty(&my_out, &rustdoc);
703-
t!(symlink_dir_force(&my_out, &out_dir));
693+
// We do not symlink to the same shared folder that already contains std library
694+
// documentation from previous steps as we do not want to include that.
695+
build.clear_if_dirty(&out, &rustdoc);
696+
t!(symlink_dir_force(&out, &out_dir));
704697

705698
let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "doc");
706699
compile::rustc_cargo(build, &mut cargo);
@@ -720,7 +713,6 @@ impl Step for Rustc {
720713
}
721714

722715
build.run(&mut cargo);
723-
cp_r(&my_out, &out);
724716
}
725717
}
726718

0 commit comments

Comments
 (0)