diff options
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index cca59538a..b33de5687 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -37,8 +37,8 @@ use crate::{ | |||
37 | code_model::{ModuleDef::Trait, TypeAlias}, | 37 | code_model::{ModuleDef::Trait, TypeAlias}, |
38 | diagnostics::DiagnosticSink, | 38 | diagnostics::DiagnosticSink, |
39 | expr::{ | 39 | expr::{ |
40 | self, Array, BinaryOp, BindingAnnotation, Body, Expr, ExprId, FieldPat, Literal, Pat, | 40 | self, Array, BinaryOp, BindingAnnotation, Body, Expr, ExprId, Literal, Pat, PatId, |
41 | PatId, Statement, UnaryOp, | 41 | RecordFieldPat, Statement, UnaryOp, |
42 | }, | 42 | }, |
43 | generics::{GenericParams, HasGenericParams}, | 43 | generics::{GenericParams, HasGenericParams}, |
44 | name, | 44 | name, |
@@ -705,10 +705,10 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
705 | ty | 705 | ty |
706 | } | 706 | } |
707 | 707 | ||
708 | fn infer_struct_pat( | 708 | fn infer_record_pat( |
709 | &mut self, | 709 | &mut self, |
710 | path: Option<&Path>, | 710 | path: Option<&Path>, |
711 | subpats: &[FieldPat], | 711 | subpats: &[RecordFieldPat], |
712 | expected: &Ty, | 712 | expected: &Ty, |
713 | default_bm: BindingMode, | 713 | default_bm: BindingMode, |
714 | id: PatId, | 714 | id: PatId, |
@@ -800,7 +800,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
800 | self.infer_tuple_struct_pat(p.as_ref(), subpats, expected, default_bm) | 800 | self.infer_tuple_struct_pat(p.as_ref(), subpats, expected, default_bm) |
801 | } | 801 | } |
802 | Pat::Struct { path: ref p, args: ref fields } => { | 802 | Pat::Struct { path: ref p, args: ref fields } => { |
803 | self.infer_struct_pat(p.as_ref(), fields, expected, default_bm, pat) | 803 | self.infer_record_pat(p.as_ref(), fields, expected, default_bm, pat) |
804 | } | 804 | } |
805 | Pat::Path(path) => { | 805 | Pat::Path(path) => { |
806 | // FIXME use correct resolver for the surrounding expression | 806 | // FIXME use correct resolver for the surrounding expression |
@@ -1103,7 +1103,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
1103 | } | 1103 | } |
1104 | Ty::simple(TypeCtor::Never) | 1104 | Ty::simple(TypeCtor::Never) |
1105 | } | 1105 | } |
1106 | Expr::StructLit { path, fields, spread } => { | 1106 | Expr::RecordLit { path, fields, spread } => { |
1107 | let (ty, def_id) = self.resolve_variant(path.as_ref()); | 1107 | let (ty, def_id) = self.resolve_variant(path.as_ref()); |
1108 | if let Some(variant) = def_id { | 1108 | if let Some(variant) = def_id { |
1109 | self.write_variant_resolution(tgt_expr.into(), variant); | 1109 | self.write_variant_resolution(tgt_expr.into(), variant); |