Use Freeze for SourceFile.external_src

This commit is contained in:
John Kåre Alsaker 2023-08-31 12:50:44 +02:00
parent f00c139998
commit c5996b80be
8 changed files with 91 additions and 46 deletions

View file

@ -169,7 +169,7 @@ impl AnnotateSnippetEmitterWriter {
.map(|line| {
// Ensure the source file is present before we try
// to load a string from it.
source_map.ensure_source_file_source_present(file.clone());
source_map.ensure_source_file_source_present(&file);
(
format!("{}", source_map.filename_for_diagnostics(&file.name)),
source_string(file.clone(), &line),