about summary refs log tree commit diff
path: root/src/librustc_expand/proc_macro_server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_expand/proc_macro_server.rs')
-rw-r--r--src/librustc_expand/proc_macro_server.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_expand/proc_macro_server.rs b/src/librustc_expand/proc_macro_server.rs
index 5f21ff503d5..b26f9caf456 100644
--- a/src/librustc_expand/proc_macro_server.rs
+++ b/src/librustc_expand/proc_macro_server.rs
@@ -596,7 +596,8 @@ impl server::SourceFile for Rustc<'_> {
     }
     fn path(&mut self, file: &Self::SourceFile) -> String {
         match file.name {
-            FileName::Real(ref path) => path
+            FileName::Real(ref name) => name
+                .local_path()
                 .to_str()
                 .expect("non-UTF8 file path in `proc_macro::SourceFile::path`")
                 .to_string(),