From 8260b8325ca820ab9dc6b224c0db0ca06f1c2b91 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sun, 16 May 2021 10:25:08 +0200 Subject: [PATCH] Use TargetTriple::from_path in rustdoc --- src/librustdoc/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ fn println_condition(condition: Condition) { 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) }