aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/expr.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-24 16:06:58 +0000
committerGitHub <[email protected]>2019-11-24 16:06:58 +0000
commitac9ba5eb32073c16608acaa04324e7dc46d303d6 (patch)
treea88c9a76a24787c1eac988f318e938406a288677 /crates/ra_hir/src/expr.rs
parentb0581c2403f49c68738c039065fa2cfc41345738 (diff)
parent434f108adad75b7c5e25db745a9f9fefa5cdaa31 (diff)
Merge #2387
2387: Simplify r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/expr.rs')
-rw-r--r--crates/ra_hir/src/expr.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs
index 6b703d8b4..43fedde7a 100644
--- a/crates/ra_hir/src/expr.rs
+++ b/crates/ra_hir/src/expr.rs
@@ -44,15 +44,15 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
44 pub(crate) fn validate_body(&mut self, db: &impl HirDatabase) { 44 pub(crate) fn validate_body(&mut self, db: &impl HirDatabase) {
45 let body = self.func.body(db); 45 let body = self.func.body(db);
46 46
47 for e in body.exprs() { 47 for e in body.exprs.iter() {
48 if let (id, Expr::RecordLit { path, fields, spread }) = e { 48 if let (id, Expr::RecordLit { path, fields, spread }) = e {
49 self.validate_record_literal(id, path, fields, *spread, db); 49 self.validate_record_literal(id, path, fields, *spread, db);
50 } 50 }
51 } 51 }
52 52
53 let body_expr = &body[body.body_expr()]; 53 let body_expr = &body[body.body_expr];
54 if let Expr::Block { statements: _, tail: Some(t) } = body_expr { 54 if let Expr::Block { statements: _, tail: Some(t) } = body_expr {
55 self.validate_results_in_tail_expr(body.body_expr(), *t, db); 55 self.validate_results_in_tail_expr(body.body_expr, *t, db);
56 } 56 }
57 } 57 }
58 58