We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e935ad commit f60a889Copy full SHA for f60a889
src/librustdoc/doctest.rs
@@ -304,12 +304,14 @@ fn add_exe_suffix(input: String, target: &TargetTriple) -> String {
304
}
305
306
fn wrapped_rustc_command(rustc_wrappers: &[PathBuf], rustc_binary: &Path) -> Command {
307
- let args: Vec<&Path> =
308
- rustc_wrappers.iter().map(PathBuf::as_path).chain([rustc_binary].into_iter()).collect();
309
- let (exe, args) = args.split_first().expect("unable to create rustc command");
+ let mut args = rustc_wrappers.iter().map(PathBuf::as_path).chain([rustc_binary].into_iter());
310
+ let exe = args.next().expect("unable to create rustc command");
311
let mut command = Command::new(exe);
312
- command.args(args);
+ for arg in args {
+ command.arg(arg);
313
+ }
314
+
315
command
316
317
0 commit comments