diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-03 07:02:57 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-03 07:02:57 +0100 |
commit | 6c64f68d4a235e4ea7cc974711dcd181d10c55dc (patch) | |
tree | 4186099009b716c736ec8820823eb3be6b008c45 /crates/ra_hir/src/ty/infer.rs | |
parent | 7faec1c30046769d4ae490e15cf5405bcfbdeef8 (diff) | |
parent | da850361ba22c78ed3579c33d6748735dcd2885c (diff) |
Merge #1753
1753: clearer ignore r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/infer.rs')
-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 { |