]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/builder.rs
Rollup merge of #104675 - SarthakSingh31:issue-101666, r=jyn514
[rust.git] / src / bootstrap / builder.rs
index 8d999302a6d7b2240a8ef56eb10c52fc7714b67c..251431a15eb89a19bcba27d867eff9f99f18365b 100644 (file)
@@ -1094,7 +1094,13 @@ pub fn cargo(
             let my_out = match mode {
                 // This is the intended out directory for compiler documentation.
                 Mode::Rustc | Mode::ToolRustc => self.compiler_doc_out(target),
-                Mode::Std => out_dir.join(target.triple).join("doc"),
+                Mode::Std => {
+                    if self.config.cmd.json() {
+                        out_dir.join(target.triple).join("json-doc")
+                    } else {
+                        out_dir.join(target.triple).join("doc")
+                    }
+                }
                 _ => panic!("doc mode {:?} not expected", mode),
             };
             let rustdoc = self.rustdoc(compiler);