]> git.lizzy.rs Git - rust.git/commitdiff
Enable RUSTC_BOOTSTRAP for a few steps
authorMark Rousskov <mark.simulacrum@gmail.com>
Mon, 8 Aug 2022 13:36:42 +0000 (09:36 -0400)
committerMark Rousskov <mark.simulacrum@gmail.com>
Mon, 31 Oct 2022 15:06:49 +0000 (11:06 -0400)
src/bootstrap/test.rs

index 38fd2e933f86317e98f908dc2343257a27a8bcd8..cf837762aa09e3ebef8bd20397b8e4a342cb7ff0 100644 (file)
@@ -986,6 +986,7 @@ fn run(self, builder: &Builder<'_>) {
                     .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 @@ fn run_ext_doc(self, builder: &Builder<'_>) {
 
         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()));