about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2022-06-18 10:48:46 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2022-06-19 15:33:09 +0000
commitb4b536d34d8d2371a4be95a2b294bbf0088807b7 (patch)
treed3623c8c1c1d12bbe7ed6e8ad94420dd994c35a3 /src
parent072b7db56161ee4c7a4411d8398c90512c153e16 (diff)
downloadrust-b4b536d34d8d2371a4be95a2b294bbf0088807b7.tar.gz
rust-b4b536d34d8d2371a4be95a2b294bbf0088807b7.zip
Preserve the path of the target spec json file for usage by rustdoc
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/doctest.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs
index 86c58cd79dc..ab72f4a3f50 100644
--- a/src/librustdoc/doctest.rs
+++ b/src/librustdoc/doctest.rs
@@ -365,8 +365,8 @@ fn run_test(
     }
     compiler.arg("--target").arg(match target {
         TargetTriple::TargetTriple(s) => s,
-        TargetTriple::TargetPath(path) => {
-            path.to_str().expect("target path must be valid unicode").to_string()
+        TargetTriple::TargetJson { path_for_rustdoc, .. } => {
+            path_for_rustdoc.to_str().expect("target path must be valid unicode").to_string()
         }
     });
     if let ErrorOutputType::HumanReadable(kind) = rustdoc_options.error_format {