about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
diff options
context:
space:
mode:
authorLuca Palmieri <rust@lpalmieri.com>2022-09-14 13:49:05 +0200
committerLuca Palmieri <rust@lpalmieri.com>2022-09-17 21:58:34 +0200
commit235dccef2b8012e7d9da87f4b6091912d802cff2 (patch)
tree5bc6336a2eaba7770223d3e83a724656ef53c78f /src/bootstrap/lib.rs
parent9da4644d5685aa0c4daa4aea6ddc9eb834ae51cc (diff)
downloadrust-235dccef2b8012e7d9da87f4b6091912d802cff2.tar.gz
rust-235dccef2b8012e7d9da87f4b6091912d802cff2.zip
Add a new component, `rust-json-docs`, to distribute the JSON-formatted documentation for std crates in nightly toolchains.
We also add a new flag to `x doc`, `--json`, to render the JSON-formatted version alongside the HTML-formatted one.
Diffstat (limited to 'src/bootstrap/lib.rs')
-rw-r--r--src/bootstrap/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index cc0cf12bd18..868ec10bc15 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -825,6 +825,11 @@ impl Build {
         self.out.join(&*target.triple).join("doc")
     }
 
+    /// Output directory for all JSON-formatted documentation for a target
+    fn json_doc_out(&self, target: TargetSelection) -> PathBuf {
+        self.out.join(&*target.triple).join("json-doc")
+    }
+
     fn test_out(&self, target: TargetSelection) -> PathBuf {
         self.out.join(&*target.triple).join("test")
     }