Skip to content

Commit 99554c1

Browse files
committed
mv CachingCodemapView CachingSourceMapView
1 parent a8154c7 commit 99554c1

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

Diff for: src/librustc/ich/caching_codemap_view.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ struct CacheEntry {
2323
}
2424

2525
#[derive(Clone)]
26-
pub struct CachingCodemapView<'cm> {
26+
pub struct CachingSourceMapView<'cm> {
2727
source_map: &'cm SourceMap,
2828
line_cache: [CacheEntry; 3],
2929
time_stamp: usize,
3030
}
3131

32-
impl<'cm> CachingCodemapView<'cm> {
33-
pub fn new(source_map: &'cm SourceMap) -> CachingCodemapView<'cm> {
32+
impl<'cm> CachingSourceMapView<'cm> {
33+
pub fn new(source_map: &'cm SourceMap) -> CachingSourceMapView<'cm> {
3434
let files = source_map.files();
3535
let first_file = files[0].clone();
3636
let entry = CacheEntry {
@@ -42,7 +42,7 @@ impl<'cm> CachingCodemapView<'cm> {
4242
file_index: 0,
4343
};
4444

45-
CachingCodemapView {
45+
CachingSourceMapView {
4646
source_map,
4747
line_cache: [entry.clone(), entry.clone(), entry.clone()],
4848
time_stamp: 0,

Diff for: src/librustc/ich/hcx.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use hir;
1212
use hir::def_id::{DefId, DefIndex};
1313
use hir::map::DefPathHash;
1414
use hir::map::definitions::Definitions;
15-
use ich::{self, CachingCodemapView, Fingerprint};
15+
use ich::{self, CachingSourceMapView, Fingerprint};
1616
use middle::cstore::CrateStore;
1717
use ty::{TyCtxt, fast_reject};
1818
use mir::interpret::AllocId;
@@ -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.
60+
// CachingSourceMapView, so we initialize it lazily.
6161
raw_source_map: &'a SourceMap,
62-
caching_source_map: Option<CachingCodemapView<'a>>,
62+
caching_source_map: Option<CachingSourceMapView<'a>>,
6363

6464
pub(super) alloc_id_recursion_tracker: FxHashSet<AllocId>,
6565
}
@@ -169,13 +169,13 @@ impl<'a> StableHashingContext<'a> {
169169
}
170170

171171
#[inline]
172-
pub fn source_map(&mut self) -> &mut CachingCodemapView<'a> {
172+
pub fn source_map(&mut self) -> &mut CachingSourceMapView<'a> {
173173
match self.caching_source_map {
174174
Some(ref mut cm) => {
175175
cm
176176
}
177177
ref mut none => {
178-
*none = Some(CachingCodemapView::new(self.raw_source_map));
178+
*none = Some(CachingSourceMapView::new(self.raw_source_map));
179179
none.as_mut().unwrap()
180180
}
181181
}

Diff for: src/librustc/ich/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! ICH - Incremental Compilation Hash
1212
1313
crate use rustc_data_structures::fingerprint::Fingerprint;
14-
pub use self::caching_codemap_view::CachingCodemapView;
14+
pub use self::caching_codemap_view::CachingSourceMapView;
1515
pub use self::hcx::{StableHashingContextProvider, StableHashingContext, NodeIdHashingMode,
1616
hash_stable_trait_impls};
1717
mod caching_codemap_view;

Diff for: src/librustc/ty/query/on_disk_cache.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use hir;
1414
use hir::def_id::{CrateNum, DefIndex, DefId, LocalDefId,
1515
RESERVED_FOR_INCR_COMP_CACHE, LOCAL_CRATE};
1616
use hir::map::definitions::DefPathHash;
17-
use ich::{CachingCodemapView, Fingerprint};
17+
use ich::{CachingSourceMapView, Fingerprint};
1818
use mir::{self, interpret};
1919
use mir::interpret::{AllocDecodingSession, AllocDecodingState};
2020
use rustc_data_structures::fx::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-
source_map: CachingCodemapView::new(tcx.sess.source_map()),
199+
source_map: CachingSourceMapView::new(tcx.sess.source_map()),
200200
file_to_file_index,
201201
};
202202

@@ -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-
source_map: CachingCodemapView<'tcx>,
773+
source_map: CachingSourceMapView<'tcx>,
774774
file_to_file_index: FxHashMap<*const SourceFile, SourceFileIndex>,
775775
}
776776

0 commit comments

Comments
 (0)