Optimize exhaustiveness checking perf a bit

This commit is contained in:
Lukas Wirth 2024-04-15 19:35:48 +02:00
parent 597c293a69
commit 94e38261b3
7 changed files with 77 additions and 89 deletions

View file

@ -1706,7 +1706,7 @@ impl<'ctx> MirLowerCtx<'ctx> {
}
fn is_uninhabited(&self, expr_id: ExprId) -> bool {
is_ty_uninhabited_from(&self.infer[expr_id], self.owner.module(self.db.upcast()), self.db)
is_ty_uninhabited_from(self.db, &self.infer[expr_id], self.owner.module(self.db.upcast()))
}
/// This function push `StorageLive` statement for the binding, and applies changes to add `StorageDead` and