Skip to content

Commit 36d9682

Browse files
committed
Auto merge of #6217 - ehuss:revert-doc-edition-z, r=Mark-Simulacrum
[1.30.0] Revert 6062 - restore -Zunstable-options for rustdoc This reverts commit 2131e5a, reversing changes made to 8dd0b1c.
2 parents 2ee151f + 6d6f40a commit 36d9682

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/cargo/core/compiler/compilation.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ 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");
143144
p.arg(format!("--edition={}", target.edition()));
144145
}
145146
Ok(p)

tests/testsuite/doc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,12 +1121,12 @@ fn doc_edition() {
11211121

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

11271127
p.cargo("test -v")
11281128
.masquerade_as_nightly_cargo()
1129-
.with_stderr_contains("[RUNNING] `rustdoc [..]--edition=2018[..]")
1129+
.with_stderr_contains("[RUNNING] `rustdoc [..]-Zunstable-options --edition=2018[..]")
11301130
.run();
11311131
}
11321132

@@ -1153,12 +1153,12 @@ fn doc_target_edition() {
11531153

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

11591159
p.cargo("test -v")
11601160
.masquerade_as_nightly_cargo()
1161-
.with_stderr_contains("[RUNNING] `rustdoc [..]--edition=2018[..]")
1161+
.with_stderr_contains("[RUNNING] `rustdoc [..]-Zunstable-options --edition=2018[..]")
11621162
.run();
11631163
}
11641164

0 commit comments

Comments
 (0)