diff options
author | Hirokazu Hata <[email protected]> | 2019-01-15 00:26:20 +0000 |
---|---|---|
committer | Hirokazu Hata <[email protected]> | 2019-01-16 14:39:14 +0000 |
commit | 5c570fa77016f1a0dc96bde29b8cf44eab9fec17 (patch) | |
tree | 5ae7019ed9b383a8ce933f38879c04df7bb72fc6 /crates/ra_hir/src | |
parent | 478ce1c8b5288432509f39aeb5b611e7614d0e03 (diff) |
Remove unneeded code
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/ty.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index d3373644d..55373b05a 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs | |||
@@ -1107,13 +1107,13 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
1107 | Ty::Tuple(Arc::from(ty_vec)) | 1107 | Ty::Tuple(Arc::from(ty_vec)) |
1108 | }, | 1108 | }, |
1109 | Expr::Array { exprs } => { | 1109 | Expr::Array { exprs } => { |
1110 | let mut elem_ty = match &expected.ty { | 1110 | let elem_ty = match &expected.ty { |
1111 | Ty::Slice(inner) | Ty::Array(inner) => Ty::clone(&inner), | 1111 | Ty::Slice(inner) | Ty::Array(inner) => Ty::clone(&inner), |
1112 | _ => self.new_type_var(), | 1112 | _ => self.new_type_var(), |
1113 | }; | 1113 | }; |
1114 | 1114 | ||
1115 | for expr in exprs.iter() { | 1115 | for expr in exprs.iter() { |
1116 | elem_ty = self.infer_expr(*expr, &Expectation::has_type(elem_ty.clone())); | 1116 | self.infer_expr(*expr, &Expectation::has_type(elem_ty.clone())); |
1117 | } | 1117 | } |
1118 | 1118 | ||
1119 | Ty::Array(Arc::new(elem_ty)) | 1119 | Ty::Array(Arc::new(elem_ty)) |