diff options
| author | lcnr <rust@lcnr.de> | 2022-07-29 12:48:28 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-07-29 12:48:28 +0200 |
| commit | d3ad264a91d9efba20c59753d88bc350f99dd952 (patch) | |
| tree | 3ca8b519c88cc15ed47d4e2e39c77ab5349ea2cf /compiler/rustc_data_structures/src | |
| parent | 7dfdd64433b07239fbac50b8227b6e03a0ba8f30 (diff) | |
| download | rust-d3ad264a91d9efba20c59753d88bc350f99dd952.tar.gz rust-d3ad264a91d9efba20c59753d88bc350f99dd952.zip | |
remove some manual hash stable impls
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/stable_hasher.rs | 5 |
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) { |
