about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-07-30 20:39:49 +0530
committerGitHub <noreply@github.com>2022-07-30 20:39:49 +0530
commit79c947443f55bcbfc4a93fdd2ba98cbe50dc3c42 (patch)
tree45282072d1e95399c230a05622273971f559a5aa /compiler/rustc_data_structures/src
parentcfd231a0cbcdbc39543c6f9e5fa2216244a89858 (diff)
parentd3ad264a91d9efba20c59753d88bc350f99dd952 (diff)
downloadrust-79c947443f55bcbfc4a93fdd2ba98cbe50dc3c42.tar.gz
rust-79c947443f55bcbfc4a93fdd2ba98cbe50dc3c42.zip
Rollup merge of #99900 - lcnr:hash-stable-fun, r=cjgillot
remove some manual hash stable impls
Diffstat (limited to 'compiler/rustc_data_structures/src')
-rw-r--r--compiler/rustc_data_structures/src/stable_hasher.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_data_structures/src/stable_hasher.rs b/compiler/rustc_data_structures/src/stable_hasher.rs
index a915a4daa95..ce859173418 100644
--- a/compiler/rustc_data_structures/src/stable_hasher.rs
+++ b/compiler/rustc_data_structures/src/stable_hasher.rs
@@ -3,6 +3,7 @@ use rustc_index::bit_set;
 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 @@ impl<CTX> HashStable<CTX> for ! {
     }
 }
 
+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) {