diff options
Diffstat (limited to 'crates/ra_hir_ty')
-rw-r--r-- | crates/ra_hir_ty/src/infer/pat.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/ra_hir_ty/src/infer/pat.rs b/crates/ra_hir_ty/src/infer/pat.rs index 623e52599..7a84e47f8 100644 --- a/crates/ra_hir_ty/src/infer/pat.rs +++ b/crates/ra_hir_ty/src/infer/pat.rs | |||
@@ -187,12 +187,8 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
187 | } | 187 | } |
188 | Pat::Slice { prefix, slice: _slice, suffix } => { | 188 | Pat::Slice { prefix, slice: _slice, suffix } => { |
189 | let (container_ty, elem_ty) = match &expected { | 189 | let (container_ty, elem_ty) = match &expected { |
190 | ty_app!(TypeCtor::Array, st) => { | 190 | ty_app!(TypeCtor::Array, st) => (TypeCtor::Array, st.as_single().clone()), |
191 | (TypeCtor::Array, st.as_single().clone()) | 191 | ty_app!(TypeCtor::Slice, st) => (TypeCtor::Slice, st.as_single().clone()), |
192 | }, | ||
193 | ty_app!(TypeCtor::Slice, st) => { | ||
194 | (TypeCtor::Slice, st.as_single().clone()) | ||
195 | }, | ||
196 | _ => (TypeCtor::Slice, Ty::Unknown), | 192 | _ => (TypeCtor::Slice, Ty::Unknown), |
197 | }; | 193 | }; |
198 | 194 | ||