diff options
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 1723921e6..58cfcd8a2 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -1044,7 +1044,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
1044 | Expr::StructLit { path, fields, spread } => { | 1044 | Expr::StructLit { path, fields, spread } => { |
1045 | let (ty, def_id) = self.resolve_variant(path.as_ref()); | 1045 | let (ty, def_id) = self.resolve_variant(path.as_ref()); |
1046 | let substs = ty.substs().unwrap_or_else(Substs::empty); | 1046 | let substs = ty.substs().unwrap_or_else(Substs::empty); |
1047 | for (field_idx, field) in fields.into_iter().enumerate() { | 1047 | for (field_idx, field) in fields.iter().enumerate() { |
1048 | let field_ty = def_id | 1048 | let field_ty = def_id |
1049 | .and_then(|it| match it.field(self.db, &field.name) { | 1049 | .and_then(|it| match it.field(self.db, &field.name) { |
1050 | Some(field) => Some(field), | 1050 | Some(field) => Some(field), |