From 5dd36bd48630e925ec617e40db8d23b593814cef Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Mon, 29 Aug 2016 15:28:53 -0400 Subject: [PATCH] Rename CacheCodemapView to CachingCodemapView. --- .../calculate_svh/svh_visitor.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/librustc_incremental/calculate_svh/svh_visitor.rs b/src/librustc_incremental/calculate_svh/svh_visitor.rs index 7bc4d0ac4633..84f4ac4b7457 100644 --- a/src/librustc_incremental/calculate_svh/svh_visitor.rs +++ b/src/librustc_incremental/calculate_svh/svh_visitor.rs @@ -40,22 +40,22 @@ pub struct StrictVersionHashVisitor<'a, 'hash: 'a, 'tcx: 'hash> { // collect a deterministic hash of def-ids that we have seen def_path_hashes: &'a mut DefPathHashes<'hash, 'tcx>, hash_spans: bool, - codemap: CachedCodemapView<'tcx>, + codemap: CachingCodemapView<'tcx>, } -struct CachedCodemapView<'tcx> { +struct CachingCodemapView<'tcx> { codemap: &'tcx CodeMap, // Format: (line number, line-start, line_end, file) line_cache: [(usize, BytePos, BytePos, Rc); 4], eviction_index: usize, } -impl<'tcx> CachedCodemapView<'tcx> { - fn new<'a>(tcx: TyCtxt<'a, 'tcx, 'tcx>) -> CachedCodemapView<'tcx> { +impl<'tcx> CachingCodemapView<'tcx> { + fn new<'a>(tcx: TyCtxt<'a, 'tcx, 'tcx>) -> CachingCodemapView<'tcx> { let codemap = tcx.sess.codemap(); let first_file = codemap.files.borrow()[0].clone(); - CachedCodemapView { + CachingCodemapView { codemap: codemap, line_cache: [(0, BytePos(0), BytePos(0), first_file.clone()), (0, BytePos(0), BytePos(0), first_file.clone()), @@ -123,7 +123,7 @@ impl<'a, 'hash, 'tcx> StrictVersionHashVisitor<'a, 'hash, 'tcx> { tcx: tcx, def_path_hashes: def_path_hashes, hash_spans: hash_spans, - codemap: CachedCodemapView::new(tcx), + codemap: CachingCodemapView::new(tcx), } }