Skip to content

Commit

Permalink
Pass the same options to rustdoc as cargo test
Browse files Browse the repository at this point in the history
`cargo test` passes `-C embed-bitcode=no --error-format human` to
`rustdoc`. This commit adds those arguments to `mdbook`'s invocation of
`rustdoc`.
  • Loading branch information
stevecheckoway committed Dec 6, 2023
1 parent 32687e6 commit d61990c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/book/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,13 @@ impl MDBook {
let mut cmd = Command::new("rustdoc");
cmd.current_dir(temp_dir.path())
.arg(&chapter_path)
.arg("--test")
.args(&[
"--test",
"-C",
"embed-bitcode=no",
"--error-format",
"human",
])
.args(&library_args);

if let Some(edition) = self.config.rust.edition {
Expand Down

0 comments on commit d61990c

Please sign in to comment.