From ebbcf9f458522e76c5a84e6771e0ef434d6d5c5b Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Wed, 7 Apr 2021 12:45:17 +0100 Subject: Fix inference with conditionally compiled tails Fixes #8378 --- 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 50497eecb..9476e6297 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs @@ -809,7 +809,7 @@ impl<'a> InferenceContext<'a> { let ty = self.resolve_ty_as_possible(ty); self.infer_pat(*pat, &ty, BindingMode::default()); } - Statement::Expr(expr) => { + Statement::Expr { expr, .. } => { self.infer_expr(*expr, &Expectation::none()); } } -- cgit v1.2.3