diff options
author | Aleksey Kladov <[email protected]> | 2020-04-30 21:44:42 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-04-30 21:58:26 +0100 |
commit | 14126349be47ee28e7feb1ebb2dd1f0392537e56 (patch) | |
tree | 89e0432f0019c39a1c468613b1f069ffdc8f05de /crates | |
parent | 1865dedadf02c0ecc71a039645ad832d33881d30 (diff) |
Kill more zombies
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir_def/src/expr.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir_ty/src/infer/expr.rs | 5 |
2 files changed, 0 insertions, 9 deletions
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); |
diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs index 83f946eee..efc60986b 100644 --- a/crates/ra_hir_ty/src/infer/expr.rs +++ b/crates/ra_hir_ty/src/infer/expr.rs | |||
@@ -73,11 +73,6 @@ impl<'a> InferenceContext<'a> { | |||
73 | self.coerce_merge_branch(&then_ty, &else_ty) | 73 | self.coerce_merge_branch(&then_ty, &else_ty) |
74 | } | 74 | } |
75 | Expr::Block { statements, tail } => self.infer_block(statements, *tail, expected), | 75 | Expr::Block { statements, tail } => self.infer_block(statements, *tail, expected), |
76 | Expr::TryBlock { body } => { | ||
77 | let _inner = self.infer_expr(*body, expected); | ||
78 | // FIXME should be std::result::Result<{inner}, _> | ||
79 | Ty::Unknown | ||
80 | } | ||
81 | Expr::Loop { body } => { | 76 | Expr::Loop { body } => { |
82 | self.infer_expr(*body, &Expectation::has_type(Ty::unit())); | 77 | self.infer_expr(*body, &Expectation::has_type(Ty::unit())); |
83 | // FIXME handle break with value | 78 | // FIXME handle break with value |