diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-11 20:01:39 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-11 20:01:39 +0100 |
commit | da80dfc0226af546244dacf3fbfdbb2b7136539a (patch) | |
tree | d1c337ce069d3016a630fb48684a5410730f7d86 /crates/hir_ty/src/diagnostics | |
parent | e290891dd75f2ae2d156e8610fd037a84c1b853f (diff) | |
parent | 11c926fd97d5efb61a771455fc233afe33939569 (diff) |
Merge #8398
8398: Fix inference with conditionally compiled tails r=flodiebold a=DJMcNab
Fixes #8378
Co-authored-by: Daniel McNab <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/diagnostics')
-rw-r--r-- | crates/hir_ty/src/diagnostics/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/diagnostics/expr.rs b/crates/hir_ty/src/diagnostics/expr.rs index 79602c3dd..47709c1e8 100644 --- a/crates/hir_ty/src/diagnostics/expr.rs +++ b/crates/hir_ty/src/diagnostics/expr.rs | |||
@@ -83,7 +83,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> { | |||
83 | if let Expr::Block { statements, tail, .. } = body_expr { | 83 | if let Expr::Block { statements, tail, .. } = body_expr { |
84 | if let Some(t) = tail { | 84 | if let Some(t) = tail { |
85 | self.validate_results_in_tail_expr(body.body_expr, *t, db); | 85 | self.validate_results_in_tail_expr(body.body_expr, *t, db); |
86 | } else if let Some(Statement::Expr(id)) = statements.last() { | 86 | } else if let Some(Statement::Expr { expr: id, .. }) = statements.last() { |
87 | self.validate_missing_tail_expr(body.body_expr, *id, db); | 87 | self.validate_missing_tail_expr(body.body_expr, *id, db); |
88 | } | 88 | } |
89 | } | 89 | } |