@@ -62,7 +62,7 @@ pub struct OnDiskCache<'sess> {
6262 prev_cnums : Vec < ( u32 , String , CrateDisambiguator ) > ,
6363 cnum_map : Once < IndexVec < CrateNum , Option < CrateNum > > > ,
6464
65- codemap : & ' sess SourceMap ,
65+ source_map : & ' sess SourceMap ,
6666 file_index_to_stable_id : FxHashMap < SourceFileIndex , StableFilemapId > ,
6767
6868 // These two fields caches that are populated lazily during decoding.
@@ -140,7 +140,7 @@ impl<'sess> OnDiskCache<'sess> {
140140 file_index_to_file : Lock :: new ( FxHashMap ( ) ) ,
141141 prev_cnums : footer. prev_cnums ,
142142 cnum_map : Once :: new ( ) ,
143- codemap : sess. source_map ( ) ,
143+ source_map : sess. source_map ( ) ,
144144 current_diagnostics : Lock :: new ( FxHashMap ( ) ) ,
145145 query_result_index : footer. query_result_index . into_iter ( ) . collect ( ) ,
146146 prev_diagnostics_index : footer. diagnostics_index . into_iter ( ) . collect ( ) ,
@@ -149,14 +149,14 @@ impl<'sess> OnDiskCache<'sess> {
149149 }
150150 }
151151
152- pub fn new_empty ( codemap : & ' sess SourceMap ) -> OnDiskCache < ' sess > {
152+ pub fn new_empty ( source_map : & ' sess SourceMap ) -> OnDiskCache < ' sess > {
153153 OnDiskCache {
154154 serialized_data : Vec :: new ( ) ,
155155 file_index_to_stable_id : FxHashMap ( ) ,
156156 file_index_to_file : Lock :: new ( FxHashMap ( ) ) ,
157157 prev_cnums : vec ! [ ] ,
158158 cnum_map : Once :: new ( ) ,
159- codemap ,
159+ source_map ,
160160 current_diagnostics : Lock :: new ( FxHashMap ( ) ) ,
161161 query_result_index : FxHashMap ( ) ,
162162 prev_diagnostics_index : FxHashMap ( ) ,
@@ -196,7 +196,7 @@ impl<'sess> OnDiskCache<'sess> {
196196 expn_info_shorthands : FxHashMap ( ) ,
197197 interpret_allocs : FxHashMap ( ) ,
198198 interpret_allocs_inverse : Vec :: new ( ) ,
199- codemap : CachingCodemapView :: new ( tcx. sess . source_map ( ) ) ,
199+ source_map : CachingCodemapView :: new ( tcx. sess . source_map ( ) ) ,
200200 file_to_file_index,
201201 } ;
202202
@@ -413,7 +413,7 @@ impl<'sess> OnDiskCache<'sess> {
413413 let mut decoder = CacheDecoder {
414414 tcx,
415415 opaque : opaque:: Decoder :: new ( & self . serialized_data [ ..] , pos. to_usize ( ) ) ,
416- codemap : self . codemap ,
416+ source_map : self . source_map ,
417417 cnum_map : self . cnum_map . get ( ) ,
418418 file_index_to_file : & self . file_index_to_file ,
419419 file_index_to_stable_id : & self . file_index_to_stable_id ,
@@ -475,7 +475,7 @@ impl<'sess> OnDiskCache<'sess> {
475475struct CacheDecoder < ' a , ' tcx : ' a , ' x > {
476476 tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
477477 opaque : opaque:: Decoder < ' x > ,
478- codemap : & ' x SourceMap ,
478+ source_map : & ' x SourceMap ,
479479 cnum_map : & ' x IndexVec < CrateNum , Option < CrateNum > > ,
480480 synthetic_expansion_infos : & ' x Lock < FxHashMap < AbsoluteBytePos , SyntaxContext > > ,
481481 file_index_to_file : & ' x Lock < FxHashMap < SourceFileIndex , Lrc < SourceFile > > > ,
@@ -488,13 +488,13 @@ impl<'a, 'tcx, 'x> CacheDecoder<'a, 'tcx, 'x> {
488488 let CacheDecoder {
489489 ref file_index_to_file,
490490 ref file_index_to_stable_id,
491- ref codemap ,
491+ ref source_map ,
492492 ..
493493 } = * self ;
494494
495495 file_index_to_file. borrow_mut ( ) . entry ( index) . or_insert_with ( || {
496496 let stable_id = file_index_to_stable_id[ & index] ;
497- codemap . source_file_by_stable_id ( stable_id)
497+ source_map . source_file_by_stable_id ( stable_id)
498498 . expect ( "Failed to lookup SourceFile in new context." )
499499 } ) . clone ( )
500500 }
@@ -770,7 +770,7 @@ struct CacheEncoder<'enc, 'a, 'tcx, E>
770770 expn_info_shorthands : FxHashMap < Mark , AbsoluteBytePos > ,
771771 interpret_allocs : FxHashMap < interpret:: AllocId , usize > ,
772772 interpret_allocs_inverse : Vec < interpret:: AllocId > ,
773- codemap : CachingCodemapView < ' tcx > ,
773+ source_map : CachingCodemapView < ' tcx > ,
774774 file_to_file_index : FxHashMap < * const SourceFile , SourceFileIndex > ,
775775}
776776
@@ -836,7 +836,7 @@ impl<'enc, 'a, 'tcx, E> SpecializedEncoder<Span> for CacheEncoder<'enc, 'a, 'tcx
836836 return TAG_INVALID_SPAN . encode ( self ) ;
837837 }
838838
839- let ( file_lo, line_lo, col_lo) = match self . codemap
839+ let ( file_lo, line_lo, col_lo) = match self . source_map
840840 . byte_pos_to_line_and_col ( span_data. lo ) {
841841 Some ( pos) => pos,
842842 None => {
0 commit comments