From 3e4368053ffa72183f32c2c7c790cd6b29713f95 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 2 Jul 2024 12:04:32 +0200 Subject: [PATCH 1/2] Improve `Command::args` API in `run-make-support` --- src/tools/run-make-support/src/command.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/run-make-support/src/command.rs b/src/tools/run-make-support/src/command.rs index ee651704c6fd0..c506c3d6b61a2 100644 --- a/src/tools/run-make-support/src/command.rs +++ b/src/tools/run-make-support/src/command.rs @@ -75,11 +75,12 @@ impl Command { /// Generic command arguments provider. Prefer specific helper methods if possible. /// Note that for some executables, arguments might be platform specific. For C/C++ /// compilers, arguments might be platform *and* compiler specific. - pub fn args(&mut self, args: &[S]) -> &mut Self + pub fn args(&mut self, args: V) -> &mut Self where S: AsRef, + V: AsRef<[S]>, { - self.cmd.args(args); + self.cmd.args(args.as_ref()); self } From 415e202c48d349dae9ad138c3adb78dc51d5ad9c Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 5 Jul 2024 11:19:52 +0200 Subject: [PATCH 2/2] Improve code of `run-make/llvm-ident` test --- tests/run-make/llvm-ident/rmake.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run-make/llvm-ident/rmake.rs b/tests/run-make/llvm-ident/rmake.rs index f460829288e8c..6934a4b36d013 100644 --- a/tests/run-make/llvm-ident/rmake.rs +++ b/tests/run-make/llvm-ident/rmake.rs @@ -28,7 +28,7 @@ fn main() { files.push(path.to_path_buf()); } }); - cmd(llvm_bin_dir().join("llvm-dis")).args(&files).run(); + cmd(llvm_bin_dir().join("llvm-dis")).args(files).run(); // Check LLVM IR files (including temporary outputs) have `!llvm.ident` // named metadata, reusing the related codegen test.