aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r--crates/hir_ty/src/infer/expr.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs
index ee6763926..7961f4a52 100644
--- a/crates/hir_ty/src/infer/expr.rs
+++ b/crates/hir_ty/src/infer/expr.rs
@@ -462,7 +462,11 @@ impl<'a> InferenceContext<'a> {
462 }; 462 };
463 match canonicalized.decanonicalize_ty(derefed_ty.value).kind(&Interner) { 463 match canonicalized.decanonicalize_ty(derefed_ty.value).kind(&Interner) {
464 TyKind::Tuple(_, substs) => name.as_tuple_index().and_then(|idx| { 464 TyKind::Tuple(_, substs) => name.as_tuple_index().and_then(|idx| {
465 substs.as_slice(&Interner).get(idx).map(|a| a.assert_ty_ref(&Interner)).cloned() 465 substs
466 .as_slice(&Interner)
467 .get(idx)
468 .map(|a| a.assert_ty_ref(&Interner))
469 .cloned()
466 }), 470 }),
467 TyKind::Adt(AdtId(hir_def::AdtId::StructId(s)), parameters) => { 471 TyKind::Adt(AdtId(hir_def::AdtId::StructId(s)), parameters) => {
468 let local_id = self.db.struct_data(*s).variant_data.field(name)?; 472 let local_id = self.db.struct_data(*s).variant_data.field(name)?;