Skip to content

Commit d3b9d89

Browse files
committed
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.
1 parent 8a0d4d9 commit d3b9d89

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/cargo/core/compiler/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,8 +653,6 @@ fn crate_version_flag_already_present(rustdoc: &ProcessBuilder) -> bool {
653653

654654
fn append_crate_version_flag(unit: &Unit<'_>, rustdoc: &mut ProcessBuilder) {
655655
rustdoc
656-
.arg("-Z")
657-
.arg("unstable-options")
658656
.arg(RUSTDOC_CRATE_VERSION_FLAG)
659657
.arg(unit.pkg.version().to_string());
660658
}

tests/testsuite/doc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ fn bin_private_items_deps() {
15131513

15141514
#[cargo_test]
15151515
fn crate_versions() {
1516-
// Testing unstable flag
1516+
// Testing flag that will reach stable on 1.44
15171517
if !is_nightly() {
15181518
return;
15191519
}
@@ -1542,7 +1542,7 @@ fn crate_versions() {
15421542

15431543
#[cargo_test]
15441544
fn crate_versions_flag_is_overridden() {
1545-
// Testing unstable flag
1545+
// Testing flag that will reach stable on 1.44
15461546
if !is_nightly() {
15471547
return;
15481548
}
@@ -1570,13 +1570,13 @@ fn crate_versions_flag_is_overridden() {
15701570

15711571
p.cargo("-Z crate-versions doc")
15721572
.masquerade_as_nightly_cargo()
1573-
.env("RUSTDOCFLAGS", "-Z unstable-options --crate-version 2.0.3")
1573+
.env("RUSTDOCFLAGS", "--crate-version 2.0.3")
15741574
.run();
15751575
asserts(output_documentation());
15761576

15771577
p.build_dir().rm_rf();
15781578

1579-
p.cargo("-Z crate-versions rustdoc -- -Z unstable-options --crate-version 2.0.3")
1579+
p.cargo("-Z crate-versions rustdoc -- --crate-version 2.0.3")
15801580
.masquerade_as_nightly_cargo()
15811581
.run();
15821582
asserts(output_documentation());

0 commit comments

Comments
 (0)