Allow to have different types for arguments of Rustc::remap_path_prefix

This commit is contained in:
Guillaume Gomez 2024-07-04 11:07:19 +02:00
parent d68fe4eaa8
commit 1471532131

View File

@ -107,7 +107,11 @@ impl Rustc {
}
/// Remap source path prefixes in all output.
pub fn remap_path_prefix<P: AsRef<Path>>(&mut self, from: P, to: P) -> &mut Self {
pub fn remap_path_prefix<P: AsRef<Path>, P2: AsRef<Path>>(
&mut self,
from: P,
to: P2,
) -> &mut Self {
let from = from.as_ref().to_string_lossy();
let to = to.as_ref().to_string_lossy();