diff options
author | Andrey Tkachenko <[email protected]> | 2019-06-06 12:36:16 +0100 |
---|---|---|
committer | Andrey Tkachenko <[email protected]> | 2019-06-06 12:43:26 +0100 |
commit | 281c9eeaff8eac4e666089f80f67cf684e1d001b (patch) | |
tree | d5d315543cfc7aa47db24aafec3b98df3754ddb3 /crates/ra_hir/src/ty | |
parent | b79e6294a68fd41f0a3dbd9eb907dfe99646d77e (diff) |
[#1083] Try block syntax
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/infer.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 905fe9f0e..579307d8a 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs | |||
@@ -946,6 +946,12 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { | |||
946 | then_ty | 946 | then_ty |
947 | } | 947 | } |
948 | Expr::Block { statements, tail } => self.infer_block(statements, *tail, expected), | 948 | Expr::Block { statements, tail } => self.infer_block(statements, *tail, expected), |
949 | Expr::TryBlock { body } => { | ||
950 | let _inner = self.infer_expr(*body, expected); | ||
951 | |||
952 | // FIXME should be std::result::Result<{inner}, _> | ||
953 | Ty::Unknown | ||
954 | } | ||
949 | Expr::Loop { body } => { | 955 | Expr::Loop { body } => { |
950 | self.infer_expr(*body, &Expectation::has_type(Ty::unit())); | 956 | self.infer_expr(*body, &Expectation::has_type(Ty::unit())); |
951 | // FIXME handle break with value | 957 | // FIXME handle break with value |