Skip to content

Commit 73b7a04

Browse files
committed
Fix crate-version with rustdoc in bootstrap.
1 parent 8e21bd0 commit 73b7a04

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

src/bootstrap/bin/rustdoc.rs

-6
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ fn main() {
4848
cmd.arg(arg);
4949
}
5050

51-
// Bootstrap's Cargo-command builder sets this variable to the current Rust version; let's pick
52-
// it up so we can make rustdoc print this into the docs
53-
if let Some(version) = env::var_os("RUSTDOC_CRATE_VERSION") {
54-
cmd.arg("--crate-version").arg(version);
55-
}
56-
5751
// Needed to be able to run all rustdoc tests.
5852
if let Some(ref x) = env::var_os("RUSTDOC_RESOURCE_SUFFIX") {
5953
// This "unstable-options" can be removed when `--resource-suffix` is stabilized

src/bootstrap/builder.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,6 @@ impl<'a> Builder<'a> {
745745
.env("RUSTDOC_LIBDIR", self.rustc_libdir(compiler))
746746
.env("CFG_RELEASE_CHANNEL", &self.config.channel)
747747
.env("RUSTDOC_REAL", self.rustdoc(compiler))
748-
.env("RUSTDOC_CRATE_VERSION", self.rust_version())
749748
.env("RUSTC_BOOTSTRAP", "1")
750749
.arg("-Winvalid_codeblock_attributes");
751750
if self.config.deny_warnings {
@@ -1271,7 +1270,7 @@ impl<'a> Builder<'a> {
12711270
}
12721271

12731272
// For `cargo doc` invocations, make rustdoc print the Rust version into the docs
1274-
cargo.env("RUSTDOC_CRATE_VERSION", self.rust_version());
1273+
rustdocflags.arg("--crate-version").arg(&self.rust_version());
12751274

12761275
// Environment variables *required* throughout the build
12771276
//

src/bootstrap/test.rs

-1
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,6 @@ impl Step for RustdocTheme {
599599
.env("RUSTDOC_LIBDIR", builder.sysroot_libdir(self.compiler, self.compiler.host))
600600
.env("CFG_RELEASE_CHANNEL", &builder.config.channel)
601601
.env("RUSTDOC_REAL", builder.rustdoc(self.compiler))
602-
.env("RUSTDOC_CRATE_VERSION", builder.rust_version())
603602
.env("RUSTC_BOOTSTRAP", "1");
604603
if let Some(linker) = builder.linker(self.compiler.host, true) {
605604
cmd.env("RUSTC_TARGET_LINKER", linker);

0 commit comments

Comments
 (0)