Use Freeze for SourceFile.lines

This commit is contained in:
John Kåre Alsaker
2023-08-31 22:12:47 +02:00
parent c5996b80be
commit f49382c050
11 changed files with 199 additions and 179 deletions

View File

@@ -1,6 +1,6 @@
use super::*;
use rustc_data_structures::sync::Lrc;
use rustc_data_structures::sync::{FreezeLock, Lrc};
fn init_source_map() -> SourceMap {
let sm = SourceMap::new(FilePathMapping::empty());
@@ -246,7 +246,7 @@ fn t10() {
name_hash,
source_len.to_u32(),
CrateNum::new(0),
lines,
FreezeLock::new(lines.read().clone()),
multibyte_chars,
non_narrow_chars,
normalized_pos,