diff options
author | Benjamin Coenen <[email protected]> | 2020-05-02 11:25:04 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-05-02 11:25:04 +0100 |
commit | 0b40876b993ab30421624b831cb03b4042eb0142 (patch) | |
tree | 85abb233dd8645480d61ab857a2b46c1209b142a /crates/ra_hir_ty/src/infer/expr.rs | |
parent | eea21738ab9e0b7438d03f7b2efc18c15cc30cf2 (diff) | |
parent | 75bc0249463b72971200e482d69dad88d4e76ae3 (diff) |
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_hir_ty/src/infer/expr.rs')
-rw-r--r-- | crates/ra_hir_ty/src/infer/expr.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/infer/expr.rs b/crates/ra_hir_ty/src/infer/expr.rs index efc60986b..83f946eee 100644 --- a/crates/ra_hir_ty/src/infer/expr.rs +++ b/crates/ra_hir_ty/src/infer/expr.rs | |||
@@ -73,6 +73,11 @@ 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 | } | ||
76 | Expr::Loop { body } => { | 81 | Expr::Loop { body } => { |
77 | self.infer_expr(*body, &Expectation::has_type(Ty::unit())); | 82 | self.infer_expr(*body, &Expectation::has_type(Ty::unit())); |
78 | // FIXME handle break with value | 83 | // FIXME handle break with value |