about summary refs log tree commit diff
path: root/compiler/rustc_span/src/source_map/tests.rs
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2023-08-31 22:12:47 +0200
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2023-09-07 13:05:05 +0200
commitf49382c0508db608aa9c33d6a8c77d2955d8f62c (patch)
tree85be68eacbc6325822cf64fba8e4841474065607 /compiler/rustc_span/src/source_map/tests.rs
parentc5996b80beaba54502fa86583b48cd6980b17b18 (diff)
downloadrust-f49382c0508db608aa9c33d6a8c77d2955d8f62c.tar.gz
rust-f49382c0508db608aa9c33d6a8c77d2955d8f62c.zip
Use `Freeze` for `SourceFile.lines`
Diffstat (limited to 'compiler/rustc_span/src/source_map/tests.rs')
-rw-r--r--compiler/rustc_span/src/source_map/tests.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_span/src/source_map/tests.rs b/compiler/rustc_span/src/source_map/tests.rs
index 7689e6afac5..e393db02064 100644
--- a/compiler/rustc_span/src/source_map/tests.rs
+++ b/compiler/rustc_span/src/source_map/tests.rs
@@ -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,