about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-07-05 11:33:18 +0200
committerGitHub <noreply@github.com>2024-07-05 11:33:18 +0200
commit4fd3b123bc4c25833d2270a428c1ba05e807af09 (patch)
treeae9c189f0cf78cf6cb490bc4f2965a47da9ddeeb
parente4d7f7c9e6b559d02312eb27b0d03a7b4938a97e (diff)
parent415e202c48d349dae9ad138c3adb78dc51d5ad9c (diff)
downloadrust-4fd3b123bc4c25833d2270a428c1ba05e807af09.tar.gz
rust-4fd3b123bc4c25833d2270a428c1ba05e807af09.zip
Rollup merge of #127359 - GuillaumeGomez:improve-run-make-llvm-ident-code, r=jieyouxu
Improve run make llvm ident code

I took the commits that are not blocking https://github.com/rust-lang/rust/pull/127237.

r? `@Kobzol`
-rw-r--r--src/tools/run-make-support/src/command.rs5
-rw-r--r--tests/run-make/llvm-ident/rmake.rs2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/run-make-support/src/command.rs b/src/tools/run-make-support/src/command.rs
index ee651704c6f..c506c3d6b61 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<S>(&mut self, args: &[S]) -> &mut Self
+    pub fn args<S, V>(&mut self, args: V) -> &mut Self
     where
         S: AsRef<ffi::OsStr>,
+        V: AsRef<[S]>,
     {
-        self.cmd.args(args);
+        self.cmd.args(args.as_ref());
         self
     }
 
diff --git a/tests/run-make/llvm-ident/rmake.rs b/tests/run-make/llvm-ident/rmake.rs
index f460829288e..6934a4b36d0 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.