Skip to content

Commit

Permalink
Unrolled build for rust-lang#122378
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#122378 - clubby789:rustbook-rebuild, r=onur-ozkan

Properly rebuild rustbooks

Fixes rust-lang#122367

If the book was out of date but the tool was up to date, this would evaluate to `!(false || true)` == `!true` == `false` and not rebuild.
  • Loading branch information
rust-timer authored Mar 12, 2024
2 parents 7de1a1f + e8cef43 commit bd541d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bootstrap/src/core/build_steps/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ impl<P: Step> Step for RustbookSrc<P> {
let rustbook = builder.tool_exe(Tool::Rustbook);
let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook);

if !builder.config.dry_run() && !(up_to_date(&src, &index) || up_to_date(&rustbook, &index))
if !builder.config.dry_run()
&& (!up_to_date(&src, &index) || !up_to_date(&rustbook, &index))
{
builder.info(&format!("Rustbook ({target}) - {name}"));
let _ = fs::remove_dir_all(&out);
Expand Down

0 comments on commit bd541d3

Please sign in to comment.