]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/ich/impls_ty.rs
intern CodeExtents
[rust.git] / src / librustc / ich / impls_ty.rs
index d68a62e50303110be09daaafc234d539d3520cc3..52bdb5d02406e4f79a6f8a3bce9ef39fe111cbd0 100644 (file)
@@ -39,7 +39,7 @@ fn hash_stable<W: StableHasherResult>(&self,
     }
 }
 
-impl<'a, 'tcx> HashStable<StableHashingContext<'a, 'tcx>> for ty::Region {
+impl<'a, 'tcx> HashStable<StableHashingContext<'a, 'tcx>> for ty::RegionKind<'tcx> {
     fn hash_stable<W: StableHasherResult>(&self,
                                           hcx: &mut StableHashingContext<'a, 'tcx>,
                                           hasher: &mut StableHasher<W>) {
@@ -432,17 +432,6 @@ fn hash_stable<W: StableHasherResult>(&self,
     FnPtrAddrCast
 });
 
-impl<'a, 'tcx> HashStable<StableHashingContext<'a, 'tcx>> for ::middle::region::CodeExtent
-{
-    fn hash_stable<W: StableHasherResult>(&self,
-                                          hcx: &mut StableHashingContext<'a, 'tcx>,
-                                          hasher: &mut StableHasher<W>) {
-        hcx.with_node_id_hashing_mode(NodeIdHashingMode::HashDefPath, |hcx| {
-            hcx.tcx().region_maps().code_extent_data(*self).hash_stable(hcx, hasher);
-        });
-    }
-}
-
 impl<'a, 'tcx> HashStable<StableHashingContext<'a, 'tcx>> for ::middle::region::CodeExtentData
 {
     fn hash_stable<W: StableHasherResult>(&self,
@@ -477,7 +466,7 @@ fn hash_stable<W: StableHasherResult>(&self,
     custom_kind
 });
 
-impl_stable_hash_for!(struct ty::FreeRegion {
+impl_stable_hash_for!(struct ty::FreeRegion<'tcx> {
     scope,
     bound_region
 });