diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-02 00:16:19 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-02 00:16:19 +0100 |
commit | 3c96de5380a09fe06752ce146edeb017ae8c701c (patch) | |
tree | 27298926ab8ffa68cfef463bd37d6564ffb417dd /crates/ra_hir_ty | |
parent | a984587c47a8ad8b7dbdae0509089a9f6d898d8d (diff) | |
parent | fd030f9450ed6910677e30f8fa65b06e71fcffa2 (diff) |
Merge #4254
4254: Put ? back in place r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_ty')
-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 |