about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev+love@gmail.com>2022-11-01 12:03:44 +0900
committerGitHub <noreply@github.com>2022-11-01 12:03:44 +0900
commit669e3cde1c24c10223fca6dfe51c2ee6d722545b (patch)
treeb0ae44f23cbf5efc6300d241a6eb94cac1d61915
parentfca9093ea36402a8ea2eb9cb2135051b8830881f (diff)
parentb123a660dd12a140dd88bcfafd061a78f00cb4f5 (diff)
downloadrust-669e3cde1c24c10223fca6dfe51c2ee6d722545b.tar.gz
rust-669e3cde1c24c10223fca6dfe51c2ee6d722545b.zip
Rollup merge of #103805 - Mark-Simulacrum:forward-port, r=jyn514
Enable RUSTC_BOOTSTRAP for a few steps

This forward-ports this commit so we don't need to keep applying it when branching beta (as done in 1.64, 1.65, and 1.66 beta bumps).
-rw-r--r--src/bootstrap/test.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 944fc3557f8..e168dd571f6 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -986,6 +986,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);
@@ -1725,6 +1726,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()));