aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r--crates/hir_ty/src/infer/expr.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs
index 3f3187ea2..6279aa572 100644
--- a/crates/hir_ty/src/infer/expr.rs
+++ b/crates/hir_ty/src/infer/expr.rs
@@ -119,6 +119,8 @@ impl<'a> InferenceContext<'a> {
119 } 119 }
120 120
121 fn infer_expr_inner(&mut self, tgt_expr: ExprId, expected: &Expectation) -> Ty { 121 fn infer_expr_inner(&mut self, tgt_expr: ExprId, expected: &Expectation) -> Ty {
122 self.db.check_canceled();
123
122 let body = Arc::clone(&self.body); // avoid borrow checker problem 124 let body = Arc::clone(&self.body); // avoid borrow checker problem
123 let ty = match &body[tgt_expr] { 125 let ty = match &body[tgt_expr] {
124 Expr::Missing => self.err_ty(), 126 Expr::Missing => self.err_ty(),
@@ -767,6 +769,7 @@ impl<'a> InferenceContext<'a> {
767 None => self.table.new_float_var(), 769 None => self.table.new_float_var(),
768 }, 770 },
769 }, 771 },
772 Expr::MacroStmts { tail } => self.infer_expr(*tail, expected),
770 }; 773 };
771 // use a new type variable if we got unknown here 774 // use a new type variable if we got unknown here
772 let ty = self.insert_type_vars_shallow(ty); 775 let ty = self.insert_type_vars_shallow(ty);