summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_middle/src/ty/impls_ty.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_middle/src/ty/impls_ty.rs')
-rw-r--r--compiler/rustc_middle/src/ty/impls_ty.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/impls_ty.rs b/compiler/rustc_middle/src/ty/impls_ty.rs
index b03874a90..129d94769 100644
--- a/compiler/rustc_middle/src/ty/impls_ty.rs
+++ b/compiler/rustc_middle/src/ty/impls_ty.rs
@@ -29,7 +29,7 @@ where
}
let mut hasher = StableHasher::new();
- (&self[..]).hash_stable(hcx, &mut hasher);
+ self[..].hash_stable(hcx, &mut hasher);
let hash: Fingerprint = hasher.finish();
cache.borrow_mut().insert(key, hash);
@@ -84,6 +84,14 @@ impl<'a> HashStable<StableHashingContext<'a>> for mir::interpret::AllocId {
}
}
+// CtfeProvenance is an AllocId and a bool.
+impl<'a> HashStable<StableHashingContext<'a>> for mir::interpret::CtfeProvenance {
+ fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
+ self.alloc_id().hash_stable(hcx, hasher);
+ self.immutable().hash_stable(hcx, hasher);
+ }
+}
+
impl<'a> ToStableHashKey<StableHashingContext<'a>> for region::Scope {
type KeyType = region::Scope;