diff --git a/frontend/exporter/src/types/copied.rs b/frontend/exporter/src/types/copied.rs index 3ac0bc430..dce59c5c7 100644 --- a/frontend/exporter/src/types/copied.rs +++ b/frontend/exporter/src/types/copied.rs @@ -876,9 +876,9 @@ impl<'s, S: UnderOwnerState<'s>, T: SInto, U> SInto> } } -impl<'tcx, S: UnderOwnerState<'tcx>> SInto for PathBuf { - fn sinto(&self, _: &S) -> String { - self.as_path().display().to_string() +impl<'tcx, S> SInto for PathBuf { + fn sinto(&self, _: &S) -> PathBuf { + self.clone() } } @@ -888,14 +888,10 @@ impl<'tcx, S: UnderOwnerState<'tcx>> SInto for PathBuf { )] #[args(, from: rustc_span::RealFileName, state: S as _s)] pub enum RealFileName { - LocalPath(#[map(x.to_str().unwrap().into())] String), - #[map(RealFileName::Remapped { - local_path: local_path.as_ref().map(|path| path.to_str().unwrap().into()), - virtual_name: virtual_name.to_str().unwrap().into() - })] + LocalPath(PathBuf), Remapped { - local_path: Option, - virtual_name: String, + local_path: Option, + virtual_name: PathBuf, }, }