Make OpaqueTypeKey the key of opaque types map

This commit is contained in:
Santiago Pastorino
2021-06-05 15:08:35 -03:00
parent 3405725e00
commit 7f8cad2019
10 changed files with 134 additions and 98 deletions

View File

@@ -835,6 +835,12 @@ impl<'tcx> InstantiatedPredicates<'tcx> {
}
}
#[derive(Copy, Clone, Debug, PartialEq, Eq, HashStable, TyEncodable, TyDecodable)]
pub struct OpaqueTypeKey<'tcx> {
pub def_id: DefId,
pub substs: SubstsRef<'tcx>,
}
rustc_index::newtype_index! {
/// "Universes" are used during type- and trait-checking in the
/// presence of `for<..>` binders to control what sets of names are