about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-02-02 22:16:48 +0800
committer许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-02-02 22:16:48 +0800
commit4d0cb4213b14457db5eb3ad21b1a65d5a91dd1ba (patch)
tree7f6884dbc8738c33a6dd9c0cfad095f92f81a3c9
parenta375d1d15e67d9cf3013976c8231449edfec6c37 (diff)
downloadrust-4d0cb4213b14457db5eb3ad21b1a65d5a91dd1ba.tar.gz
rust-4d0cb4213b14457db5eb3ad21b1a65d5a91dd1ba.zip
compiletest: remove useless path join in `rustdoc_json` runtest logic
-rw-r--r--src/tools/compiletest/src/runtest/rustdoc_json.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tools/compiletest/src/runtest/rustdoc_json.rs b/src/tools/compiletest/src/runtest/rustdoc_json.rs
index 31fdb0a5d13..bf7eb2e109a 100644
--- a/src/tools/compiletest/src/runtest/rustdoc_json.rs
+++ b/src/tools/compiletest/src/runtest/rustdoc_json.rs
@@ -16,13 +16,12 @@ impl TestCx<'_> {
             self.fatal_proc_rec("rustdoc failed!", &proc_res);
         }
 
-        let root = self.config.find_rust_src_root().unwrap();
         let mut json_out = out_dir.join(self.testpaths.file.file_stem().unwrap());
         json_out.set_extension("json");
         let res = self.run_command_to_procres(
             Command::new(self.config.jsondocck_path.as_ref().unwrap())
                 .arg("--doc-dir")
-                .arg(root.join(&out_dir))
+                .arg(&out_dir)
                 .arg("--template")
                 .arg(&self.testpaths.file),
         );