diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-30 21:59:15 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-30 21:59:15 +0100 |
commit | a5f2b16366f027ad60c58266a66eb7fbdcbda9f9 (patch) | |
tree | 3a35738bc84ce0dd2902d2394df2adbc8792986e /crates/ra_hir_def/src | |
parent | c96b2180c1c4206a0a98c280b4d30897eb116336 (diff) | |
parent | 14126349be47ee28e7feb1ebb2dd1f0392537e56 (diff) |
Merge #4233
4233: Remove dead TryBlock expressio r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_def/src/expr.rs | 4 |
2 files changed, 0 insertions, 8 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index 571603854..f467ed3fe 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs | |||
@@ -182,10 +182,6 @@ impl ExprCollector<'_> { | |||
182 | 182 | ||
183 | self.alloc_expr(Expr::If { condition, then_branch, else_branch }, syntax_ptr) | 183 | self.alloc_expr(Expr::If { condition, then_branch, else_branch }, syntax_ptr) |
184 | } | 184 | } |
185 | ast::Expr::TryBlockExpr(e) => { | ||
186 | let body = self.collect_block_opt(e.body()); | ||
187 | self.alloc_expr(Expr::TryBlock { body }, syntax_ptr) | ||
188 | } | ||
189 | ast::Expr::BlockExpr(e) => self.collect_block(e), | 185 | ast::Expr::BlockExpr(e) => self.collect_block(e), |
190 | ast::Expr::LoopExpr(e) => { | 186 | ast::Expr::LoopExpr(e) => { |
191 | let body = self.collect_block_opt(e.loop_body()); | 187 | let body = self.collect_block_opt(e.loop_body()); |
diff --git a/crates/ra_hir_def/src/expr.rs b/crates/ra_hir_def/src/expr.rs index a0cdad529..aad12e123 100644 --- a/crates/ra_hir_def/src/expr.rs +++ b/crates/ra_hir_def/src/expr.rs | |||
@@ -101,9 +101,6 @@ pub enum Expr { | |||
101 | Try { | 101 | Try { |
102 | expr: ExprId, | 102 | expr: ExprId, |
103 | }, | 103 | }, |
104 | TryBlock { | ||
105 | body: ExprId, | ||
106 | }, | ||
107 | Cast { | 104 | Cast { |
108 | expr: ExprId, | 105 | expr: ExprId, |
109 | type_ref: TypeRef, | 106 | type_ref: TypeRef, |
@@ -239,7 +236,6 @@ impl Expr { | |||
239 | f(*expr); | 236 | f(*expr); |
240 | } | 237 | } |
241 | } | 238 | } |
242 | Expr::TryBlock { body } => f(*body), | ||
243 | Expr::Loop { body } => f(*body), | 239 | Expr::Loop { body } => f(*body), |
244 | Expr::While { condition, body } => { | 240 | Expr::While { condition, body } => { |
245 | f(*condition); | 241 | f(*condition); |