Skip to content

Commit

Permalink
Rollup merge of rust-lang#111977 - jyn514:doc-errors, r=est31
Browse files Browse the repository at this point in the history
Make errors from `x doc` less verbose

before:
```
error: could not document `bootstrap`

Caused by:
  process didn't exit successfully: `/home/jyn/src/rust/build/bootstrap/debug/rustdoc ... --crate-version '1.71.0
  (eb9da7b
  2023-05-25)
  (a
  long
  description
  goes
  here)' --document-private-items --enable-index-page --show-type-layout --generate-link-to-definition -Zunstable-options` (exit status: 1)
```

after:
```
error: could not document `bootstrap`

Caused by:
  process didn't exit successfully: `/home/jyn/src/rust/build/bootstrap/debug/rustdoc ... --crate-version '1.71.0        (eb9da7b      2023-05-25)     (a     long     description    goes     here)' --document-private-items --enable-index-page --show-type-layout --generate-link-to-definition -Zunstable-options` (exit status: 1)
```
  • Loading branch information
compiler-errors committed May 26, 2023
2 parents a40a67f + 39f337a commit a7d7ad3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1917,10 +1917,10 @@ impl<'a> Builder<'a> {
}

// For `cargo doc` invocations, make rustdoc print the Rust version into the docs
// This replaces spaces with newlines because RUSTDOCFLAGS does not
// This replaces spaces with tabs because RUSTDOCFLAGS does not
// support arguments with regular spaces. Hopefully someday Cargo will
// have space support.
let rust_version = self.rust_version().replace(' ', "\n");
let rust_version = self.rust_version().replace(' ', "\t");
rustdocflags.arg("--crate-version").arg(&rust_version);

// Environment variables *required* throughout the build
Expand Down

0 comments on commit a7d7ad3

Please sign in to comment.