diff options
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 9ba146299..b89a40b4b 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -749,7 +749,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
749 | let is_non_ref_pat = match &body[pat] { | 749 | let is_non_ref_pat = match &body[pat] { |
750 | Pat::Tuple(..) | 750 | Pat::Tuple(..) |
751 | | Pat::TupleStruct { .. } | 751 | | Pat::TupleStruct { .. } |
752 | | Pat::Struct { .. } | 752 | | Pat::Record { .. } |
753 | | Pat::Range { .. } | 753 | | Pat::Range { .. } |
754 | | Pat::Slice { .. } => true, | 754 | | Pat::Slice { .. } => true, |
755 | // FIXME: Path/Lit might actually evaluate to ref, but inference is unimplemented. | 755 | // FIXME: Path/Lit might actually evaluate to ref, but inference is unimplemented. |
@@ -806,10 +806,10 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
806 | let subty = self.infer_pat(*pat, expectation, default_bm); | 806 | let subty = self.infer_pat(*pat, expectation, default_bm); |
807 | Ty::apply_one(TypeCtor::Ref(*mutability), subty) | 807 | Ty::apply_one(TypeCtor::Ref(*mutability), subty) |
808 | } | 808 | } |
809 | Pat::TupleStruct { path: ref p, args: ref subpats } => { | 809 | Pat::TupleStruct { path: p, args: subpats } => { |
810 | self.infer_tuple_struct_pat(p.as_ref(), subpats, expected, default_bm) | 810 | self.infer_tuple_struct_pat(p.as_ref(), subpats, expected, default_bm) |
811 | } | 811 | } |
812 | Pat::Struct { path: ref p, args: ref fields } => { | 812 | Pat::Record { path: p, args: fields } => { |
813 | self.infer_record_pat(p.as_ref(), fields, expected, default_bm, pat) | 813 | self.infer_record_pat(p.as_ref(), fields, expected, default_bm, pat) |
814 | } | 814 | } |
815 | Pat::Path(path) => { | 815 | Pat::Path(path) => { |
@@ -817,7 +817,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
817 | let resolver = self.resolver.clone(); | 817 | let resolver = self.resolver.clone(); |
818 | self.infer_path_expr(&resolver, &path, pat.into()).unwrap_or(Ty::Unknown) | 818 | self.infer_path_expr(&resolver, &path, pat.into()).unwrap_or(Ty::Unknown) |
819 | } | 819 | } |
820 | Pat::Bind { mode, name: _name, subpat } => { | 820 | Pat::Bind { mode, name: _, subpat } => { |
821 | let mode = if mode == &BindingAnnotation::Unannotated { | 821 | let mode = if mode == &BindingAnnotation::Unannotated { |
822 | default_bm | 822 | default_bm |
823 | } else { | 823 | } else { |