about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2021-05-16 10:25:08 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2021-05-16 10:27:06 +0200
commit8260b8325ca820ab9dc6b224c0db0ca06f1c2b91 (patch)
tree0b8b0df63de029d062ea1cc50da33b72535e6d12
parent69b352ef7749825abde2d8f8e31c05f681e61a10 (diff)
downloadrust-8260b8325ca820ab9dc6b224c0db0ca06f1c2b91.tar.gz
rust-8260b8325ca820ab9dc6b224c0db0ca06f1c2b91.zip
Use TargetTriple::from_path in rustdoc
-rw-r--r--src/librustdoc/config.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs
index b75e98ae16c..ac863a1b05b 100644
--- a/src/librustdoc/config.rs
+++ b/src/librustdoc/config.rs
@@ -565,7 +565,7 @@ impl Options {
         let target =
             matches.opt_str("target").map_or(TargetTriple::from_triple(host_triple()), |target| {
                 if target.ends_with(".json") {
-                    TargetTriple::TargetPath(PathBuf::from(target))
+                    TargetTriple::from_path(Path::new(&target))
                 } else {
                     TargetTriple::TargetTriple(target)
                 }