diff --git a/src/librustc/ich/impls_ty.rs b/src/librustc/ich/impls_ty.rs index 0f8926c6f440..04e57883c775 100644 --- a/src/librustc/ich/impls_ty.rs +++ b/src/librustc/ich/impls_ty.rs @@ -104,16 +104,16 @@ for ty::RegionKind { c.hash_stable(hcx, hasher); } ty::ReLateBound(db, ty::BrAnon(i)) => { - db.depth.hash_stable(hcx, hasher); + db.hash_stable(hcx, hasher); i.hash_stable(hcx, hasher); } ty::ReLateBound(db, ty::BrNamed(def_id, name)) => { - db.depth.hash_stable(hcx, hasher); + db.hash_stable(hcx, hasher); def_id.hash_stable(hcx, hasher); name.hash_stable(hcx, hasher); } ty::ReLateBound(db, ty::BrEnv) => { - db.depth.hash_stable(hcx, hasher); + db.hash_stable(hcx, hasher); } ty::ReEarlyBound(ty::EarlyBoundRegion { def_id, index, name }) => { def_id.hash_stable(hcx, hasher); @@ -821,10 +821,6 @@ impl_stable_hash_for!(enum ::middle::resolve_lifetime::Region { Free(call_site_scope_data, decl) }); -impl_stable_hash_for!(struct ty::DebruijnIndex { - depth -}); - impl_stable_hash_for!(enum ty::cast::CastKind { CoercionCast, PtrPtrCast, diff --git a/src/librustc/ty/sty.rs b/src/librustc/ty/sty.rs index 8e2c611d8416..275540b9efe9 100644 --- a/src/librustc/ty/sty.rs +++ b/src/librustc/ty/sty.rs @@ -1319,6 +1319,10 @@ impl DebruijnIndex { } } +impl_stable_hash_for!(struct DebruijnIndex { + depth +}); + /// Region utilities impl RegionKind { pub fn is_late_bound(&self) -> bool {