Move things in hir_ty into submodules

- all the types that will be replaced by Chalk go to `types`
 - `TypeWalk` impls go to `walk`
This commit is contained in:
Florian Diebold 2021-04-04 20:22:00 +02:00
parent bc8b278841
commit 508a1ecad3
11 changed files with 751 additions and 707 deletions

View file

@ -452,11 +452,7 @@ impl<'a> InferenceContext<'a> {
};
match canonicalized.decanonicalize_ty(derefed_ty.value).kind(&Interner) {
TyKind::Tuple(_, substs) => name.as_tuple_index().and_then(|idx| {
substs
.interned(&Interner)
.get(idx)
.map(|a| a.assert_ty_ref(&Interner))
.cloned()
substs.interned().get(idx).map(|a| a.assert_ty_ref(&Interner)).cloned()
}),
TyKind::Adt(AdtId(hir_def::AdtId::StructId(s)), parameters) => {
let local_id = self.db.struct_data(*s).variant_data.field(name)?;