From 1471532131984a8819401b02201982b5993ba996 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 4 Jul 2024 11:07:19 +0200 Subject: [PATCH] Allow to have different types for arguments of `Rustc::remap_path_prefix` --- src/tools/run-make-support/src/rustc.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/run-make-support/src/rustc.rs b/src/tools/run-make-support/src/rustc.rs index 3f23c1b8f9e76..ffc18a5e48753 100644 --- a/src/tools/run-make-support/src/rustc.rs +++ b/src/tools/run-make-support/src/rustc.rs @@ -107,7 +107,11 @@ impl Rustc { } /// Remap source path prefixes in all output. - pub fn remap_path_prefix>(&mut self, from: P, to: P) -> &mut Self { + pub fn remap_path_prefix, P2: AsRef>( + &mut self, + from: P, + to: P2, + ) -> &mut Self { let from = from.as_ref().to_string_lossy(); let to = to.as_ref().to_string_lossy();