1
Fork 0

Rollup merge of #101549 - eholk:type-ir-derive-hashstable_generic, r=jackh726

Use HashStable_Generic in rustc_type_ir

A lot of the types in this crate implemented HashStable directly to avoid circular dependencies. One way around that is to use HashStable_Generic. We adopt that here to avoid a lot of boilerplate.

This doesn't update all the types, because some would require `I: Interner + HashStable`.

r? `@cjgillot`
This commit is contained in:
Dylan DPC 2022-09-08 11:55:10 +05:30 committed by GitHub
commit 7f46d7313c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 43 deletions

View file

@ -21,6 +21,7 @@ rustc_serialize = { path = "../rustc_serialize" }
rustc_session = { path = "../rustc_session" }
rustc_span = { path = "../rustc_span" }
rustc_target = { path = "../rustc_target" }
rustc_type_ir = { path = "../rustc_type_ir" }
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
thin-vec = "0.2.8"
tracing = "0.1"

View file

@ -148,3 +148,5 @@ impl<'tcx> HashStable<StableHashingContext<'tcx>> for rustc_feature::Features {
});
}
}
impl<'ctx> rustc_type_ir::HashStableContext for StableHashingContext<'ctx> {}