Skip to content

Commit cb74dde

Browse files
committed
Rename CacheEncoder::source_map as caching_source_map_view.
To make clear it's not a `SourceMap`.
1 parent 919c632 commit cb74dde

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

compiler/rustc_middle/src/query/on_disk_cache.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ impl OnDiskCache {
231231
type_shorthands: Default::default(),
232232
predicate_shorthands: Default::default(),
233233
interpret_allocs: Default::default(),
234-
source_map: CachingSourceMapView::new(tcx.sess.source_map()),
234+
caching_source_map_view: CachingSourceMapView::new(tcx.sess.source_map()),
235235
file_to_file_index,
236236
hygiene_context: &hygiene_encode_context,
237237
symbol_index_table: Default::default(),
@@ -783,7 +783,7 @@ pub struct CacheEncoder<'a, 'tcx> {
783783
type_shorthands: FxHashMap<Ty<'tcx>, usize>,
784784
predicate_shorthands: FxHashMap<ty::PredicateKind<'tcx>, usize>,
785785
interpret_allocs: FxIndexSet<interpret::AllocId>,
786-
source_map: CachingSourceMapView<'tcx>,
786+
caching_source_map_view: CachingSourceMapView<'tcx>,
787787
file_to_file_index: FxHashMap<*const SourceFile, SourceFileIndex>,
788788
hygiene_context: &'a HygieneEncodeContext,
789789
// Used for both `Symbol`s and `ByteSymbol`s.
@@ -900,7 +900,7 @@ impl<'a, 'tcx> SpanEncoder for CacheEncoder<'a, 'tcx> {
900900
}
901901

902902
let Some((file_lo, line_lo, col_lo)) =
903-
self.source_map.byte_pos_to_line_and_col(span_data.lo)
903+
self.caching_source_map_view.byte_pos_to_line_and_col(span_data.lo)
904904
else {
905905
return TAG_PARTIAL_SPAN.encode(self);
906906
};

0 commit comments

Comments
 (0)