Skip to content

Commit 2131e5a

Browse files
committed
Auto merge of #6062 - joelgallant:rustdoc-edition, r=alexcrichton
Removes -Zunstable-options for rustdoc testing As far as I understand, this flag isn't needed anymore, since --edition is stable on beta. I ran in to this when running `cargo +beta test --doc --verbose` on my crate, which errors with: ``` Running `rustdoc -Zunstable-options --edition=2018 [omitted...]` error: the option `Z` is only accepted on the nightly compiler ```
2 parents 8dd0b1c + b3eb747 commit 2131e5a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/cargo/core/compiler/compilation.rs

-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ impl<'cfg> Compilation<'cfg> {
140140
pub fn rustdoc_process(&self, pkg: &Package, target: &Target) -> CargoResult<ProcessBuilder> {
141141
let mut p = self.fill_env(process(&*self.config.rustdoc()?), pkg, false)?;
142142
if target.edition() != Edition::Edition2015 {
143-
p.arg("-Zunstable-options");
144143
p.arg(format!("--edition={}", target.edition()));
145144
}
146145
Ok(p)

tests/testsuite/doc.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1118,12 +1118,12 @@ fn doc_edition() {
11181118

11191119
p.cargo("doc -v")
11201120
.masquerade_as_nightly_cargo()
1121-
.with_stderr_contains("[RUNNING] `rustdoc [..]-Zunstable-options --edition=2018[..]")
1121+
.with_stderr_contains("[RUNNING] `rustdoc [..]--edition=2018[..]")
11221122
.run();
11231123

11241124
p.cargo("test -v")
11251125
.masquerade_as_nightly_cargo()
1126-
.with_stderr_contains("[RUNNING] `rustdoc [..]-Zunstable-options --edition=2018[..]")
1126+
.with_stderr_contains("[RUNNING] `rustdoc [..]--edition=2018[..]")
11271127
.run();
11281128
}
11291129

@@ -1150,12 +1150,12 @@ fn doc_target_edition() {
11501150

11511151
p.cargo("doc -v")
11521152
.masquerade_as_nightly_cargo()
1153-
.with_stderr_contains("[RUNNING] `rustdoc [..]-Zunstable-options --edition=2018[..]")
1153+
.with_stderr_contains("[RUNNING] `rustdoc [..]--edition=2018[..]")
11541154
.run();
11551155

11561156
p.cargo("test -v")
11571157
.masquerade_as_nightly_cargo()
1158-
.with_stderr_contains("[RUNNING] `rustdoc [..]-Zunstable-options --edition=2018[..]")
1158+
.with_stderr_contains("[RUNNING] `rustdoc [..]--edition=2018[..]")
11591159
.run();
11601160
}
11611161

0 commit comments

Comments
 (0)