From d3ad264a91d9efba20c59753d88bc350f99dd952 Mon Sep 17 00:00:00 2001 From: lcnr Date: Fri, 29 Jul 2022 12:48:28 +0200 Subject: remove some manual hash stable impls --- compiler/rustc_data_structures/src/stable_hasher.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/rustc_data_structures') 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 HashStable for ! { } } +impl HashStable for PhantomData { + fn hash_stable(&self, _ctx: &mut CTX, _hasher: &mut StableHasher) {} +} + impl HashStable for ::std::num::NonZeroU32 { #[inline] fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) { -- cgit 1.4.1-3-g733a5