diff options
author | Aleksey Kladov <[email protected]> | 2019-07-19 16:25:07 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-19 16:25:07 +0100 |
commit | a6df224f7d3893f5a742b58818eac6c5a953721d (patch) | |
tree | 12e2301c22b893d8f25abd7ded41f8b163e82efa /crates/ra_hir/src | |
parent | 5c594bcb48f01bdcf3068f72cefffda337a03533 (diff) |
minor
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/expr.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs index 70af3f119..66cb9633b 100644 --- a/crates/ra_hir/src/expr.rs +++ b/crates/ra_hir/src/expr.rs | |||
@@ -564,11 +564,7 @@ where | |||
564 | .else_branch() | 564 | .else_branch() |
565 | .map(|b| match b { | 565 | .map(|b| match b { |
566 | ast::ElseBranch::Block(it) => self.collect_block(it), | 566 | ast::ElseBranch::Block(it) => self.collect_block(it), |
567 | ast::ElseBranch::IfExpr(elif) => { | 567 | ast::ElseBranch::IfExpr(elif) => self.collect_expr(elif.into()), |
568 | let expr: ast::Expr = | ||
569 | ast::Expr::cast(elif.syntax().clone()).unwrap(); | ||
570 | self.collect_expr(expr) | ||
571 | } | ||
572 | }) | 568 | }) |
573 | .unwrap_or_else(|| self.empty_block()); | 569 | .unwrap_or_else(|| self.empty_block()); |
574 | let placeholder_pat = self.pats.alloc(Pat::Missing); | 570 | let placeholder_pat = self.pats.alloc(Pat::Missing); |