From cbb476e8df4d8fd6dc776462ab3721570f27160c Mon Sep 17 00:00:00 2001 From: Oneirical Date: Thu, 28 Mar 2024 23:37:44 -0400 Subject: [PATCH] Rewrite core-no-fp-fmt-parse in Rust --- src/tools/run-make-support/src/rustc.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tools/run-make-support/src/rustc.rs b/src/tools/run-make-support/src/rustc.rs index d0ab8df42d282..8dd1a3fa52775 100644 --- a/src/tools/run-make-support/src/rustc.rs +++ b/src/tools/run-make-support/src/rustc.rs @@ -104,6 +104,13 @@ impl Rustc { self } + /// Generic file path provider. + pub fn arg_path(&mut self, path: &[&str]) -> &mut Self { + let path_buf = path.iter().collect::(); + self.cmd.arg(path_buf.to_str().unwrap()); + self + } + /// Generic command arguments provider. Use `.arg("-Zname")` over `.arg("-Z").arg("arg")`. /// This method will panic if a plain `-Z` or `-C` is passed, or if `-Z ` or `-C ` /// is passed (note the space).