Implement unstable RFC 1872 exhaustive_patterns

This commit is contained in:
iDawer 2022-08-31 20:17:54 +05:00
parent e3dc5a588f
commit 1a580a3396
6 changed files with 265 additions and 20 deletions

View file

@ -159,12 +159,7 @@ impl ExprValidator {
}
let pattern_arena = Arena::new();
let cx = MatchCheckCtx {
module: self.owner.module(db.upcast()),
body: self.owner,
db,
pattern_arena: &pattern_arena,
};
let cx = MatchCheckCtx::new(self.owner.module(db.upcast()), self.owner, db, &pattern_arena);
let mut m_arms = Vec::with_capacity(arms.len());
let mut has_lowering_errors = false;