Skip to content

Commit

Permalink
Make errors from x doc less verbose
Browse files Browse the repository at this point in the history
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
jyn514 committed May 26, 2023
1 parent eb9da7b commit 39f337a
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 @@ -1915,10 +1915,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 39f337a

Please sign in to comment.