diff options
Diffstat (limited to 'crates/hir_ty/src/infer/expr.rs')
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index c584a2c08..a87429a24 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs | |||
@@ -452,11 +452,7 @@ impl<'a> InferenceContext<'a> { | |||
452 | }; | 452 | }; |
453 | match canonicalized.decanonicalize_ty(derefed_ty.value).kind(&Interner) { | 453 | match canonicalized.decanonicalize_ty(derefed_ty.value).kind(&Interner) { |
454 | TyKind::Tuple(_, substs) => name.as_tuple_index().and_then(|idx| { | 454 | TyKind::Tuple(_, substs) => name.as_tuple_index().and_then(|idx| { |
455 | substs | 455 | substs.interned().get(idx).map(|a| a.assert_ty_ref(&Interner)).cloned() |
456 | .interned(&Interner) | ||
457 | .get(idx) | ||
458 | .map(|a| a.assert_ty_ref(&Interner)) | ||
459 | .cloned() | ||
460 | }), | 456 | }), |
461 | TyKind::Adt(AdtId(hir_def::AdtId::StructId(s)), parameters) => { | 457 | TyKind::Adt(AdtId(hir_def::AdtId::StructId(s)), parameters) => { |
462 | let local_id = self.db.struct_data(*s).variant_data.field(name)?; | 458 | let local_id = self.db.struct_data(*s).variant_data.field(name)?; |