diff options
Diffstat (limited to 'crates/ra_hir/src/ty/infer')
-rw-r--r-- | crates/ra_hir/src/ty/infer/coerce.rs | 2 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/infer/expr.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty/infer/coerce.rs b/crates/ra_hir/src/ty/infer/coerce.rs index 4b53bba73..bb9a2e427 100644 --- a/crates/ra_hir/src/ty/infer/coerce.rs +++ b/crates/ra_hir/src/ty/infer/coerce.rs | |||
@@ -246,7 +246,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
246 | ty_app!(TypeCtor::Adt(Adt::Struct(struct2)), st2), | 246 | ty_app!(TypeCtor::Adt(Adt::Struct(struct2)), st2), |
247 | ) if struct1 == struct2 => { | 247 | ) if struct1 == struct2 => { |
248 | let field_tys = self.db.field_types(struct1.id.into()); | 248 | let field_tys = self.db.field_types(struct1.id.into()); |
249 | let struct_data = self.db.struct_data(struct1.id.0); | 249 | let struct_data = self.db.struct_data(struct1.id); |
250 | 250 | ||
251 | let mut fields = struct_data.variant_data.fields().iter(); | 251 | let mut fields = struct_data.variant_data.fields().iter(); |
252 | let (last_field_id, _data) = fields.next_back()?; | 252 | let (last_field_id, _data) = fields.next_back()?; |
diff --git a/crates/ra_hir/src/ty/infer/expr.rs b/crates/ra_hir/src/ty/infer/expr.rs index 1d6df2b7a..994a6d7e9 100644 --- a/crates/ra_hir/src/ty/infer/expr.rs +++ b/crates/ra_hir/src/ty/infer/expr.rs | |||
@@ -263,6 +263,8 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
263 | .clone() | 263 | .clone() |
264 | .subst(&a_ty.parameters) | 264 | .subst(&a_ty.parameters) |
265 | }), | 265 | }), |
266 | // FIXME: | ||
267 | TypeCtor::Adt(Adt::Union(_)) => None, | ||
266 | _ => None, | 268 | _ => None, |
267 | }, | 269 | }, |
268 | _ => None, | 270 | _ => None, |