Skip to content

Commit

Permalink
Auto merge of #6217 - ehuss:revert-doc-edition-z, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
[1.30.0] Revert 6062 - restore -Zunstable-options for rustdoc

This reverts commit 2131e5a, reversing
changes made to 8dd0b1c.
  • Loading branch information
bors committed Oct 24, 2018
2 parents 2ee151f + 6d6f40a commit 36d9682
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/cargo/core/compiler/compilation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ impl<'cfg> Compilation<'cfg> {
pub fn rustdoc_process(&self, pkg: &Package, target: &Target) -> CargoResult<ProcessBuilder> {
let mut p = self.fill_env(process(&*self.config.rustdoc()?), pkg, false)?;
if target.edition() != Edition::Edition2015 {
p.arg("-Zunstable-options");
p.arg(format!("--edition={}", target.edition()));
}
Ok(p)
Expand Down
8 changes: 4 additions & 4 deletions tests/testsuite/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1121,12 +1121,12 @@ fn doc_edition() {

p.cargo("doc -v")
.masquerade_as_nightly_cargo()
.with_stderr_contains("[RUNNING] `rustdoc [..]--edition=2018[..]")
.with_stderr_contains("[RUNNING] `rustdoc [..]-Zunstable-options --edition=2018[..]")
.run();

p.cargo("test -v")
.masquerade_as_nightly_cargo()
.with_stderr_contains("[RUNNING] `rustdoc [..]--edition=2018[..]")
.with_stderr_contains("[RUNNING] `rustdoc [..]-Zunstable-options --edition=2018[..]")
.run();
}

Expand All @@ -1153,12 +1153,12 @@ fn doc_target_edition() {

p.cargo("doc -v")
.masquerade_as_nightly_cargo()
.with_stderr_contains("[RUNNING] `rustdoc [..]--edition=2018[..]")
.with_stderr_contains("[RUNNING] `rustdoc [..]-Zunstable-options --edition=2018[..]")
.run();

p.cargo("test -v")
.masquerade_as_nightly_cargo()
.with_stderr_contains("[RUNNING] `rustdoc [..]--edition=2018[..]")
.with_stderr_contains("[RUNNING] `rustdoc [..]-Zunstable-options --edition=2018[..]")
.run();
}

Expand Down

0 comments on commit 36d9682

Please sign in to comment.