From a142beaf013a016a48eb9f193b55e0cbcb80b6a9 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 23 Dec 2020 12:24:24 +0100 Subject: Implement const block inference --- crates/hir_ty/src/infer/expr.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir_ty/src/infer') diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index 2cdce2cef..744569e6e 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs @@ -155,7 +155,7 @@ impl<'a> InferenceContext<'a> { } None => self.infer_block(statements, *tail, expected), }, - Expr::Unsafe { body } => self.infer_expr(*body, expected), + Expr::Unsafe { body } | Expr::Const { body } => self.infer_expr(*body, expected), Expr::TryBlock { body } => { let _inner = self.infer_expr(*body, expected); // FIXME should be std::result::Result<{inner}, _> -- cgit v1.2.3