From ce70c6f3f3648e9722ec2bcec6171d52e0139ed4 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Mon, 8 Aug 2022 09:36:42 -0400 Subject: [PATCH] Enable RUSTC_BOOTSTRAP for a few steps --- src/bootstrap/test.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 9d286ddd6d164..dd41f84530ff7 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -964,6 +964,7 @@ impl Step for RustdocGUI { .arg("doc") .arg("--target-dir") .arg(&out_dir) + .env("RUSTC_BOOTSTRAP", "1") .env("RUSTDOC", builder.rustdoc(self.compiler)) .env("RUSTC", builder.rustc(self.compiler)) .current_dir(path); @@ -1699,6 +1700,8 @@ impl BookTest { let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook); let path = builder.src.join(&self.path); + // Books often have feature-gated example text. + rustbook_cmd.env("RUSTC_BOOTSTRAP", "1"); rustbook_cmd.env("PATH", new_path).arg("test").arg(path); builder.add_rust_test_threads(&mut rustbook_cmd); builder.info(&format!("Testing rustbook {}", self.path.display()));