about summary refs log tree commit diff
path: root/src/librustc/ich/impls_syntax.rs
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2017-12-19 15:14:41 +0100
committerMichael Woerister <michaelwoerister@posteo>2017-12-19 15:27:50 +0100
commit0258c6dacaa6e187ae9bf744fd3184e79f78f2ef (patch)
tree93126f94926ad0ef74e640f0ff2be0e60a4b84a1 /src/librustc/ich/impls_syntax.rs
parentb39c4bc12358078f77ddd01288b24252f757f37d (diff)
downloadrust-0258c6dacaa6e187ae9bf744fd3184e79f78f2ef.tar.gz
rust-0258c6dacaa6e187ae9bf744fd3184e79f78f2ef.zip
incr.comp.: Precompute small hash for filenames to save some work.
Diffstat (limited to 'src/librustc/ich/impls_syntax.rs')
-rw-r--r--src/librustc/ich/impls_syntax.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustc/ich/impls_syntax.rs b/src/librustc/ich/impls_syntax.rs
index c25aa10eb1e..57120d61e7c 100644
--- a/src/librustc/ich/impls_syntax.rs
+++ b/src/librustc/ich/impls_syntax.rs
@@ -387,7 +387,8 @@ impl<'gcx> HashStable<StableHashingContext<'gcx>> for FileMap {
                                           hcx: &mut StableHashingContext<'gcx>,
                                           hasher: &mut StableHasher<W>) {
         let FileMap {
-            ref name,
+            name: _, // We hash the smaller name_hash instead of this
+            name_hash,
             name_was_remapped,
             unmapped_path: _,
             crate_of_origin,
@@ -402,7 +403,7 @@ impl<'gcx> HashStable<StableHashingContext<'gcx>> for FileMap {
             ref non_narrow_chars,
         } = *self;
 
-        name.hash_stable(hcx, hasher);
+        (name_hash as u64).hash_stable(hcx, hasher);
         name_was_remapped.hash_stable(hcx, hasher);
 
         DefId {