diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2017-12-15 16:50:07 -0600 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2017-12-15 16:50:07 -0600 |
| commit | c7e5b703cd5c4926b477fe1ded13df42d31a62da (patch) | |
| tree | f4ab0a465ecef6c8123307a14c40f8da486745ff /src/librustc | |
| parent | 77efd6800c57ba83923dddbbabf03c7afa6a34a4 (diff) | |
| download | rust-c7e5b703cd5c4926b477fe1ded13df42d31a62da.tar.gz rust-c7e5b703cd5c4926b477fe1ded13df42d31a62da.zip | |
incr.comp.: Revert hashing optimization that caused regression.
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/ich/hcx.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ich/impls_syntax.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ty/maps/on_disk_cache.rs | 2 |
3 files changed, 2 insertions, 4 deletions
diff --git a/src/librustc/ich/hcx.rs b/src/librustc/ich/hcx.rs index f9fb668110b..7099b951129 100644 --- a/src/librustc/ich/hcx.rs +++ b/src/librustc/ich/hcx.rs @@ -341,7 +341,7 @@ impl<'gcx> HashStable<StableHashingContext<'gcx>> for Span { std_hash::Hash::hash(&TAG_VALID_SPAN, hasher); // We truncate the stable_id hash and line and col numbers. The chances // of causing a collision this way should be minimal. - std_hash::Hash::hash(&(file_lo.stable_id.0 as u64), hasher); + std_hash::Hash::hash(&file_lo.name, hasher); let col = (col_lo.0 as u64) & 0xFF; let line = ((line_lo as u64) & 0xFF_FF_FF) << 8; diff --git a/src/librustc/ich/impls_syntax.rs b/src/librustc/ich/impls_syntax.rs index dfb90a5d27f..c25aa10eb1e 100644 --- a/src/librustc/ich/impls_syntax.rs +++ b/src/librustc/ich/impls_syntax.rs @@ -394,8 +394,6 @@ impl<'gcx> HashStable<StableHashingContext<'gcx>> for FileMap { // Do not hash the source as it is not encoded src: _, src_hash, - // The stable id is just a hash of other fields - stable_id: _, external_src: _, start_pos, end_pos: _, diff --git a/src/librustc/ty/maps/on_disk_cache.rs b/src/librustc/ty/maps/on_disk_cache.rs index 7d583a35477..079b518efd8 100644 --- a/src/librustc/ty/maps/on_disk_cache.rs +++ b/src/librustc/ty/maps/on_disk_cache.rs @@ -176,7 +176,7 @@ impl<'sess> OnDiskCache<'sess> { let index = FileMapIndex(index as u32); let file_ptr: *const FileMap = &**file as *const _; file_to_file_index.insert(file_ptr, index); - file_index_to_stable_id.insert(index, file.stable_id); + file_index_to_stable_id.insert(index, StableFilemapId::new(&file)); } (file_to_file_index, file_index_to_stable_id) |
