diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-04-20 04:45:53 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2017-04-30 17:02:59 -0400 |
| commit | c7dc39dbf095f04839b57a1e34afc6ab29d905d3 (patch) | |
| tree | af402b44cd3acabe29fce966c7ff781d203eede8 /src/librustc/ich | |
| parent | 55d6066c05fea0e0787ac5add67e26283468116c (diff) | |
| download | rust-c7dc39dbf095f04839b57a1e34afc6ab29d905d3.tar.gz rust-c7dc39dbf095f04839b57a1e34afc6ab29d905d3.zip | |
intern CodeExtents
Make a `CodeExtent<'tcx>` be something allocated in an arena instead of an index into the `RegionMaps`.
Diffstat (limited to 'src/librustc/ich')
| -rw-r--r-- | src/librustc/ich/impls_ty.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/librustc/ich/impls_ty.rs b/src/librustc/ich/impls_ty.rs index d68a62e5030..52bdb5d0240 100644 --- a/src/librustc/ich/impls_ty.rs +++ b/src/librustc/ich/impls_ty.rs @@ -39,7 +39,7 @@ impl<'a, 'tcx> HashStable<StableHashingContext<'a, 'tcx>> for ty::subst::Kind<'t } } -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 @@ impl_stable_hash_for!(enum ty::cast::CastKind { 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 @@ impl_stable_hash_for!(struct ty::adjustment::CoerceUnsizedInfo { custom_kind }); -impl_stable_hash_for!(struct ty::FreeRegion { +impl_stable_hash_for!(struct ty::FreeRegion<'tcx> { scope, bound_region }); |
