diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2021-08-26 12:46:01 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2021-08-27 11:50:44 +0200 |
| commit | af1b65cb18d5fa1358d1ae7a8ed3b1f7c635b6b5 (patch) | |
| tree | afc0d0959aae2f267142807624136555545f4fd8 /compiler/rustc_errors/src/json.rs | |
| parent | dfd6306d26af1a163aaaa1456b4594244ddd182f (diff) | |
| download | rust-af1b65cb18d5fa1358d1ae7a8ed3b1f7c635b6b5.tar.gz rust-af1b65cb18d5fa1358d1ae7a8ed3b1f7c635b6b5.zip | |
Path remapping: Make behavior of diagnostics output dependent on presence of --remap-path-prefix.
Diffstat (limited to 'compiler/rustc_errors/src/json.rs')
| -rw-r--r-- | compiler/rustc_errors/src/json.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/json.rs b/compiler/rustc_errors/src/json.rs index 1b6cd04cca6..dde978cd8c6 100644 --- a/compiler/rustc_errors/src/json.rs +++ b/compiler/rustc_errors/src/json.rs @@ -464,7 +464,7 @@ impl DiagnosticSpan { }); DiagnosticSpan { - file_name: start.file.name.prefer_local().to_string(), + file_name: je.sm.filename_for_diagnostics(&start.file.name).to_string(), byte_start: start.file.original_relative_byte_pos(span.lo()).0, byte_end: start.file.original_relative_byte_pos(span.hi()).0, line_start: start.line, |
