|
1 | 1 | //! This module contains `HashStable` implementations for various data types |
2 | 2 | //! from `rustc_middle::ty` in no particular order. |
3 | 3 |
|
4 | | -use crate::ich::{NodeIdHashingMode, StableHashingContext}; |
| 4 | +use crate::ich::StableHashingContext; |
5 | 5 | use crate::middle::region; |
6 | 6 | use crate::mir; |
7 | 7 | use crate::ty; |
@@ -163,37 +163,3 @@ impl<'a> ToStableHashKey<StableHashingContext<'a>> for region::Scope { |
163 | 163 | *self |
164 | 164 | } |
165 | 165 | } |
166 | | - |
167 | | -impl<'a> HashStable<StableHashingContext<'a>> for ty::TyVid { |
168 | | - fn hash_stable(&self, _hcx: &mut StableHashingContext<'a>, _hasher: &mut StableHasher) { |
169 | | - // `TyVid` values are confined to an inference context and hence |
170 | | - // should not be hashed. |
171 | | - bug!("ty::TyKind::hash_stable() - can't hash a TyVid {:?}.", *self) |
172 | | - } |
173 | | -} |
174 | | - |
175 | | -impl<'a> HashStable<StableHashingContext<'a>> for ty::IntVid { |
176 | | - fn hash_stable(&self, _hcx: &mut StableHashingContext<'a>, _hasher: &mut StableHasher) { |
177 | | - // `IntVid` values are confined to an inference context and hence |
178 | | - // should not be hashed. |
179 | | - bug!("ty::TyKind::hash_stable() - can't hash an IntVid {:?}.", *self) |
180 | | - } |
181 | | -} |
182 | | - |
183 | | -impl<'a> HashStable<StableHashingContext<'a>> for ty::FloatVid { |
184 | | - fn hash_stable(&self, _hcx: &mut StableHashingContext<'a>, _hasher: &mut StableHasher) { |
185 | | - // `FloatVid` values are confined to an inference context and hence |
186 | | - // should not be hashed. |
187 | | - bug!("ty::TyKind::hash_stable() - can't hash a FloatVid {:?}.", *self) |
188 | | - } |
189 | | -} |
190 | | - |
191 | | -impl<'a> HashStable<StableHashingContext<'a>> for crate::middle::privacy::AccessLevels { |
192 | | - fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) { |
193 | | - hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| { |
194 | | - let crate::middle::privacy::AccessLevels { ref map } = *self; |
195 | | - |
196 | | - map.hash_stable(hcx, hasher); |
197 | | - }); |
198 | | - } |
199 | | -} |
0 commit comments