fix false positive for enum with no variants

This commit is contained in:
Josh Mcguigan 2020-04-14 16:06:57 -07:00
parent c82e7696e6
commit 360bdf653b
3 changed files with 51 additions and 3 deletions

View file

@ -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();