]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_data_structures/src/stable_hasher.rs
Auto merge of #100023 - saethlin:send-sync-chunksmut, r=m-ou-se
[rust.git] / compiler / rustc_data_structures / src / stable_hasher.rs
index a915a4daa9541a287329d1ae16d7db32885f4a57..ce8591734188077a14b3d8b3c8d2db460d720217 100644 (file)
@@ -3,6 +3,7 @@
 use rustc_index::vec;
 use smallvec::SmallVec;
 use std::hash::{BuildHasher, Hash, Hasher};
+use std::marker::PhantomData;
 use std::mem;
 
 #[cfg(test)]
@@ -261,6 +262,10 @@ fn hash_stable(&self, _ctx: &mut CTX, _hasher: &mut StableHasher) {
     }
 }
 
+impl<CTX, T> HashStable<CTX> for PhantomData<T> {
+    fn hash_stable(&self, _ctx: &mut CTX, _hasher: &mut StableHasher) {}
+}
+
 impl<CTX> HashStable<CTX> for ::std::num::NonZeroU32 {
     #[inline]
     fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {