@@ -12,7 +12,7 @@ use hir;
1212use hir:: def_id:: { DefId , DefIndex } ;
1313use hir:: map:: DefPathHash ;
1414use hir:: map:: definitions:: Definitions ;
15- use ich:: { self , CachingCodemapView , Fingerprint } ;
15+ use ich:: { self , CachingSourceMapView , Fingerprint } ;
1616use middle:: cstore:: CrateStore ;
1717use ty:: { TyCtxt , fast_reject} ;
1818use mir:: interpret:: AllocId ;
@@ -25,7 +25,7 @@ use std::cell::RefCell;
2525
2626use syntax:: ast;
2727
28- use syntax:: codemap :: CodeMap ;
28+ use syntax:: source_map :: SourceMap ;
2929use syntax:: ext:: hygiene:: SyntaxContext ;
3030use syntax:: symbol:: Symbol ;
3131use syntax_pos:: { Span , DUMMY_SP } ;
@@ -57,9 +57,9 @@ pub struct StableHashingContext<'a> {
5757 node_id_hashing_mode : NodeIdHashingMode ,
5858
5959 // Very often, we are hashing something that does not need the
60- // CachingCodemapView , so we initialize it lazily.
61- raw_codemap : & ' a CodeMap ,
62- caching_codemap : Option < CachingCodemapView < ' a > > ,
60+ // CachingSourceMapView , so we initialize it lazily.
61+ raw_source_map : & ' a SourceMap ,
62+ caching_source_map : Option < CachingSourceMapView < ' a > > ,
6363
6464 pub ( super ) alloc_id_recursion_tracker : FxHashSet < AllocId > ,
6565}
@@ -100,8 +100,8 @@ impl<'a> StableHashingContext<'a> {
100100 body_resolver : BodyResolver ( krate) ,
101101 definitions,
102102 cstore,
103- caching_codemap : None ,
104- raw_codemap : sess. codemap ( ) ,
103+ caching_source_map : None ,
104+ raw_source_map : sess. source_map ( ) ,
105105 hash_spans : hash_spans_initial,
106106 hash_bodies : true ,
107107 node_id_hashing_mode : NodeIdHashingMode :: HashDefPath ,
@@ -169,13 +169,13 @@ impl<'a> StableHashingContext<'a> {
169169 }
170170
171171 #[ inline]
172- pub fn codemap ( & mut self ) -> & mut CachingCodemapView < ' a > {
173- match self . caching_codemap {
172+ pub fn source_map ( & mut self ) -> & mut CachingSourceMapView < ' a > {
173+ match self . caching_source_map {
174174 Some ( ref mut cm) => {
175175 cm
176176 }
177177 ref mut none => {
178- * none = Some ( CachingCodemapView :: new ( self . raw_codemap ) ) ;
178+ * none = Some ( CachingSourceMapView :: new ( self . raw_source_map ) ) ;
179179 none. as_mut ( ) . unwrap ( )
180180 }
181181 }
@@ -308,9 +308,9 @@ impl<'a> HashStable<StableHashingContext<'a>> for Span {
308308
309309 // Hash a span in a stable way. We can't directly hash the span's BytePos
310310 // fields (that would be similar to hashing pointers, since those are just
311- // offsets into the CodeMap ). Instead, we hash the (file name, line, column)
312- // triple, which stays the same even if the containing FileMap has moved
313- // within the CodeMap .
311+ // offsets into the SourceMap ). Instead, we hash the (file name, line, column)
312+ // triple, which stays the same even if the containing SourceFile has moved
313+ // within the SourceMap .
314314 // Also note that we are hashing byte offsets for the column, not unicode
315315 // codepoint offsets. For the purpose of the hash that's sufficient.
316316 // Also, hashing filenames is expensive so we avoid doing it twice when the
@@ -340,7 +340,7 @@ impl<'a> HashStable<StableHashingContext<'a>> for Span {
340340 return std_hash:: Hash :: hash ( & TAG_INVALID_SPAN , hasher) ;
341341 }
342342
343- let ( file_lo, line_lo, col_lo) = match hcx. codemap ( )
343+ let ( file_lo, line_lo, col_lo) = match hcx. source_map ( )
344344 . byte_pos_to_line_and_col ( span. lo ) {
345345 Some ( pos) => pos,
346346 None => {
0 commit comments