1
Fork 0

Path remapping: Make behavior of diagnostics output dependent on presence of --remap-path-prefix.

This commit is contained in:
Michael Woerister 2021-08-26 12:46:01 +02:00
parent dfd6306d26
commit af1b65cb18
13 changed files with 65 additions and 41 deletions

View file

@ -190,7 +190,7 @@ pub fn maybe_file_to_stream(
let src = source_file.src.as_ref().unwrap_or_else(|| {
sess.span_diagnostic.bug(&format!(
"cannot lex `source_file` without source: {}",
source_file.name.prefer_local()
sess.source_map().filename_for_diagnostics(&source_file.name)
));
});