@@ -45,7 +45,7 @@ pub struct StrictVersionHashVisitor<'a, 'hash: 'a, 'tcx: 'hash> {
45
45
46
46
struct CachingCodemapView < ' tcx > {
47
47
codemap : & ' tcx CodeMap ,
48
- // Format: (line number, line-start, line_end , file)
48
+ // Format: (line number, line-start, line-end , file)
49
49
line_cache : [ ( usize , BytePos , BytePos , Rc < FileMap > ) ; 4 ] ,
50
50
eviction_index : usize ,
51
51
}
@@ -100,7 +100,7 @@ impl<'tcx> CachingCodemapView<'tcx> {
100
100
let line_index = file. lookup_line ( pos) . unwrap ( ) ;
101
101
let ( line_start, line_end) = file. line_bounds ( line_index) ;
102
102
103
- // Just overwrite some cache entry. If we got this for , all of them
103
+ // Just overwrite some cache entry. If we got this far , all of them
104
104
// point to the wrong file.
105
105
self . line_cache [ self . eviction_index ] = ( line_index + 1 ,
106
106
line_start,
@@ -131,11 +131,11 @@ impl<'a, 'hash, 'tcx> StrictVersionHashVisitor<'a, 'hash, 'tcx> {
131
131
self . def_path_hashes . hash ( def_id)
132
132
}
133
133
134
- // Hash a span in a stable way. If we would just hash the spans BytePos
135
- // fields that would be similar hashing pointers since those or just offsets
136
- // into the CodeMap. Instead, we hash the (file name, line, column) triple,
137
- // which stays the same even if the containing FileMap has moved within the
138
- // CodeMap.
134
+ // Hash a span in a stable way. We can't directly hash the span's BytePos
135
+ // fields ( that would be similar to hashing pointers, since those are just
136
+ // offsets into the CodeMap) . Instead, we hash the (file name, line, column)
137
+ // triple, which stays the same even if the containing FileMap has moved
138
+ // within the CodeMap.
139
139
// Also note that we are hashing byte offsets for the column, not unicode
140
140
// codepoint offsets. For the purpose of the hash that's sufficient.
141
141
fn hash_span ( & mut self , span : Span ) {
@@ -462,7 +462,6 @@ impl<'a, 'hash, 'tcx> visit::Visitor<'tcx> for StrictVersionHashVisitor<'a, 'has
462
462
fn visit_generics ( & mut self , g : & ' tcx Generics ) {
463
463
debug ! ( "visit_generics: st={:?}" , self . st) ;
464
464
SawGenerics . hash ( self . st ) ;
465
- // FIXME: nested stuff
466
465
visit:: walk_generics ( self , g)
467
466
}
468
467
@@ -605,7 +604,8 @@ impl<'a, 'hash, 'tcx> visit::Visitor<'tcx> for StrictVersionHashVisitor<'a, 'has
605
604
SawMacroDef . hash ( self . st ) ;
606
605
hash_attrs ! ( self , & macro_def. attrs) ;
607
606
visit:: walk_macro_def ( self , macro_def)
608
- // FIXME: We should hash the body of the macro too.
607
+ // FIXME(mw): We should hash the body of the macro too but we don't
608
+ // have a stable way of doing so yet.
609
609
}
610
610
}
611
611
}
0 commit comments