File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
src/librustc_save_analysis Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -37,11 +37,18 @@ impl<'a> SpanUtils<'a> {
3737
3838 pub fn make_filename_string ( & self , file : & SourceFile ) -> String {
3939 match & file. name {
40- FileName :: Real ( path) if !path. is_absolute ( ) && !file. name_was_remapped => {
41- self . sess . working_dir . 0
42- . join ( & path)
43- . display ( )
44- . to_string ( )
40+ FileName :: Real ( path) if !file. name_was_remapped => {
41+ if path. is_absolute ( ) {
42+ self . sess . source_map ( ) . path_mapping ( )
43+ . map_prefix ( path. clone ( ) ) . 0
44+ . display ( )
45+ . to_string ( )
46+ } else {
47+ self . sess . working_dir . 0
48+ . join ( & path)
49+ . display ( )
50+ . to_string ( )
51+ }
4552 } ,
4653 // If the file name is already remapped, we assume the user
4754 // configured it the way they wanted to, so use that directly
You can’t perform that action at this time.
0 commit comments