about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorAndy Wang <cbeuw.andy@gmail.com>2021-04-19 23:27:02 +0100
committerAndy Wang <cbeuw.andy@gmail.com>2021-05-05 15:31:28 +0100
commit5417b45c2676dcd396f007bd89ed0cd55d085768 (patch)
tree25a9819f523855d604aa373edb93c850f817532f /compiler/rustc_parse/src
parentfb4f6439f62d4b940bdfab3f78771d76eacab379 (diff)
downloadrust-5417b45c2676dcd396f007bd89ed0cd55d085768.tar.gz
rust-5417b45c2676dcd396f007bd89ed0cd55d085768.zip
Use local and remapped paths where appropriate
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/lib.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/lib.rs b/compiler/rustc_parse/src/lib.rs
index 905077a48e2..077b19fa959 100644
--- a/compiler/rustc_parse/src/lib.rs
+++ b/compiler/rustc_parse/src/lib.rs
@@ -188,8 +188,10 @@ pub fn maybe_file_to_stream(
     override_span: Option<Span>,
 ) -> Result<(TokenStream, Vec<lexer::UnmatchedBrace>), Vec<Diagnostic>> {
     let src = source_file.src.as_ref().unwrap_or_else(|| {
-        sess.span_diagnostic
-            .bug(&format!("cannot lex `source_file` without source: {}", source_file.name));
+        sess.span_diagnostic.bug(&format!(
+            "cannot lex `source_file` without source: {}",
+            source_file.name.prefer_local()
+        ));
     });
 
     let (token_trees, unmatched_braces) =