aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/infer
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_ty/src/infer')
-rw-r--r--crates/ra_hir_ty/src/infer/expr.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs
index 06baac2a9..bd9a387f5 100644
--- a/crates/ra_hir_ty/src/infer/expr.rs
+++ b/crates/ra_hir_ty/src/infer/expr.rs
@@ -405,8 +405,15 @@ impl<'a> InferenceContext<'a> {
405 .subst(&a_ty.parameters) 405 .subst(&a_ty.parameters)
406 }) 406 })
407 } 407 }
408 // FIXME: 408 TypeCtor::Adt(AdtId::UnionId(u)) => {
409 TypeCtor::Adt(AdtId::UnionId(_)) => None, 409 self.db.union_data(u).variant_data.field(name).map(|local_id| {
410 let field = FieldId { parent: u.into(), local_id };
411 self.write_field_resolution(tgt_expr, field);
412 self.db.field_types(u.into())[field.local_id]
413 .clone()
414 .subst(&a_ty.parameters)
415 })
416 }
410 _ => None, 417 _ => None,
411 }, 418 },
412 _ => None, 419 _ => None,