]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_parse/src/lib.rs
Use local and remapped paths where appropriate
[rust.git] / compiler / rustc_parse / src / lib.rs
index 905077a48e25a76de0244a5f5cd36a5a210f7a51..077b19fa959596c1fba44713a6c075f3fbba95e8 100644 (file)
@@ -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) =