mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
fix false positive for enum with no variants
This commit is contained in:
parent
c82e7696e6
commit
360bdf653b
3 changed files with 51 additions and 3 deletions
|
@ -156,7 +156,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> {
|
|||
None => return,
|
||||
};
|
||||
|
||||
let cx = MatchCheckCtx { body, infer: infer.clone(), db };
|
||||
let cx = MatchCheckCtx { match_expr, body, infer: infer.clone(), db };
|
||||
let pats = arms.iter().map(|arm| arm.pat);
|
||||
|
||||
let mut seen = Matrix::empty();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue