Use stabilized version of rustdoc's --crate-version

Since --crate-version flag of rustdoc was stabilized, there is no need to enable its unstable features when using it.
This commit is contained in:
Alex Tokarev 2020-03-26 01:15:05 +03:00
parent 8a0d4d9c9a
commit d3b9d89a38
2 changed files with 4 additions and 6 deletions

View File

@ -653,8 +653,6 @@ fn crate_version_flag_already_present(rustdoc: &ProcessBuilder) -> bool {
fn append_crate_version_flag(unit: &Unit<'_>, rustdoc: &mut ProcessBuilder) { fn append_crate_version_flag(unit: &Unit<'_>, rustdoc: &mut ProcessBuilder) {
rustdoc rustdoc
.arg("-Z")
.arg("unstable-options")
.arg(RUSTDOC_CRATE_VERSION_FLAG) .arg(RUSTDOC_CRATE_VERSION_FLAG)
.arg(unit.pkg.version().to_string()); .arg(unit.pkg.version().to_string());
} }

View File

@ -1513,7 +1513,7 @@ fn bin_private_items_deps() {
#[cargo_test] #[cargo_test]
fn crate_versions() { fn crate_versions() {
// Testing unstable flag // Testing flag that will reach stable on 1.44
if !is_nightly() { if !is_nightly() {
return; return;
} }
@ -1542,7 +1542,7 @@ fn crate_versions() {
#[cargo_test] #[cargo_test]
fn crate_versions_flag_is_overridden() { fn crate_versions_flag_is_overridden() {
// Testing unstable flag // Testing flag that will reach stable on 1.44
if !is_nightly() { if !is_nightly() {
return; return;
} }
@ -1570,13 +1570,13 @@ fn crate_versions_flag_is_overridden() {
p.cargo("-Z crate-versions doc") p.cargo("-Z crate-versions doc")
.masquerade_as_nightly_cargo() .masquerade_as_nightly_cargo()
.env("RUSTDOCFLAGS", "-Z unstable-options --crate-version 2.0.3") .env("RUSTDOCFLAGS", "--crate-version 2.0.3")
.run(); .run();
asserts(output_documentation()); asserts(output_documentation());
p.build_dir().rm_rf(); p.build_dir().rm_rf();
p.cargo("-Z crate-versions rustdoc -- -Z unstable-options --crate-version 2.0.3") p.cargo("-Z crate-versions rustdoc -- --crate-version 2.0.3")
.masquerade_as_nightly_cargo() .masquerade_as_nightly_cargo()
.run(); .run();
asserts(output_documentation()); asserts(output_documentation());