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