mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
Fix bug in match arm type unification
This commit is contained in:
parent
44e9a9605b
commit
5027c5d4ee
1 changed files with 1 additions and 1 deletions
|
@ -1143,7 +1143,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> {
|
||||||
ret_ty
|
ret_ty
|
||||||
}
|
}
|
||||||
Expr::Match { expr, arms } => {
|
Expr::Match { expr, arms } => {
|
||||||
let mut expected = Expectation::none();
|
let mut expected = expected.clone();
|
||||||
let input_ty = self.infer_expr(*expr, &Expectation::none());
|
let input_ty = self.infer_expr(*expr, &Expectation::none());
|
||||||
let pat_expectation = Expectation::has_type(input_ty);
|
let pat_expectation = Expectation::has_type(input_ty);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue