about summary refs log tree commit diff
path: root/src/librustc_data_structures
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo.net>2017-04-27 16:12:57 +0200
committerMichael Woerister <michaelwoerister@posteo.net>2017-05-08 12:31:26 +0200
commit6a5e2a5a9eee3a504d89c014d80fd8f301226c27 (patch)
tree6151252de6da4e37bafc4db02151463a7d60141f /src/librustc_data_structures
parent70198a0a44633c7c9d14fce2159c1f750491287b (diff)
downloadrust-6a5e2a5a9eee3a504d89c014d80fd8f301226c27.tar.gz
rust-6a5e2a5a9eee3a504d89c014d80fd8f301226c27.zip
incr.comp.: Hash more pieces of crate metadata to detect changes there.
Diffstat (limited to 'src/librustc_data_structures')
-rw-r--r--src/librustc_data_structures/stable_hasher.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/librustc_data_structures/stable_hasher.rs b/src/librustc_data_structures/stable_hasher.rs
index 95f063976d4..635b95d861d 100644
--- a/src/librustc_data_structures/stable_hasher.rs
+++ b/src/librustc_data_structures/stable_hasher.rs
@@ -283,6 +283,16 @@ impl<CTX> HashStable<CTX> for str {
     }
 }
 
+
+impl<CTX> HashStable<CTX> for String {
+    #[inline]
+    fn hash_stable<W: StableHasherResult>(&self,
+                                          hcx: &mut CTX,
+                                          hasher: &mut StableHasher<W>) {
+        (&self[..]).hash_stable(hcx, hasher);
+    }
+}
+
 impl<CTX> HashStable<CTX> for bool {
     #[inline]
     fn hash_stable<W: StableHasherResult>(&self,