Skip to content

Commit

Permalink
Auto merge of #8039 - aleksator:use_stable_crate_version, r=ehuss
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Mar 26, 2020
2 parents c673bcb + d3b9d89 commit 3342792
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/cargo/core/compiler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,6 @@ fn crate_version_flag_already_present(rustdoc: &ProcessBuilder) -> bool {

fn append_crate_version_flag(unit: &Unit<'_>, rustdoc: &mut ProcessBuilder) {
rustdoc
.arg("-Z")
.arg("unstable-options")
.arg(RUSTDOC_CRATE_VERSION_FLAG)
.arg(unit.pkg.version().to_string());
}
Expand Down
8 changes: 4 additions & 4 deletions tests/testsuite/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ fn bin_private_items_deps() {

#[cargo_test]
fn crate_versions() {
// Testing unstable flag
// Testing flag that will reach stable on 1.44
if !is_nightly() {
return;
}
Expand Down Expand Up @@ -1542,7 +1542,7 @@ fn crate_versions() {

#[cargo_test]
fn crate_versions_flag_is_overridden() {
// Testing unstable flag
// Testing flag that will reach stable on 1.44
if !is_nightly() {
return;
}
Expand Down Expand Up @@ -1570,13 +1570,13 @@ fn crate_versions_flag_is_overridden() {

p.cargo("-Z crate-versions doc")
.masquerade_as_nightly_cargo()
.env("RUSTDOCFLAGS", "-Z unstable-options --crate-version 2.0.3")
.env("RUSTDOCFLAGS", "--crate-version 2.0.3")
.run();
asserts(output_documentation());

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()
.run();
asserts(output_documentation());
Expand Down

0 comments on commit 3342792

Please sign in to comment.