Skip to content

Commit 07409a9

Browse files
committed
Keep 4 entries in CachingSourceMapView.
1 parent 2f9c9ce commit 07409a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_span/src/caching_source_map_view.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl CacheEntry {
5555
#[derive(Clone)]
5656
pub struct CachingSourceMapView<'sm> {
5757
source_map: &'sm SourceMap,
58-
line_cache: [CacheEntry; 3],
58+
line_cache: [CacheEntry; 4],
5959
time_stamp: usize,
6060
}
6161

@@ -73,7 +73,7 @@ impl<'sm> CachingSourceMapView<'sm> {
7373

7474
CachingSourceMapView {
7575
source_map,
76-
line_cache: [entry.clone(), entry.clone(), entry],
76+
line_cache: [entry.clone(), entry.clone(), entry.clone(), entry],
7777
time_stamp: 0,
7878
}
7979
}

0 commit comments

Comments
 (0)