Skip to content

Commit 54b5d30

Browse files
committed
fix target & runtool args order
1 parent 167510f commit 54b5d30

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/librustdoc/test.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,12 @@ fn run_test(
263263
if no_run && !compile_fail {
264264
compiler.arg("--emit=metadata");
265265
}
266-
compiler.arg("--target").arg(target.to_string());
266+
compiler.arg("--target").arg(match target {
267+
TargetTriple::TargetTriple(s) => s,
268+
TargetTriple::TargetPath(path) => {
269+
path.to_str().expect("target path must be valid unicode").to_string()
270+
}
271+
});
267272

268273
compiler.arg("-");
269274
compiler.stdin(Stdio::piped());
@@ -312,8 +317,8 @@ fn run_test(
312317

313318
if let Some(tool) = runtool {
314319
cmd = Command::new(tool);
315-
cmd.arg(output_file);
316320
cmd.args(runtool_args);
321+
cmd.arg(output_file);
317322
} else {
318323
cmd = Command::new(output_file);
319324
}

0 commit comments

Comments
 (0)