diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-08-31 22:12:47 +0200 | 
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2023-09-07 13:05:05 +0200 | 
| commit | f49382c0508db608aa9c33d6a8c77d2955d8f62c (patch) | |
| tree | 85be68eacbc6325822cf64fba8e4841474065607 /compiler/rustc_span/src/source_map/tests.rs | |
| parent | c5996b80beaba54502fa86583b48cd6980b17b18 (diff) | |
| download | rust-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.rs | 4 | 
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, | 
