This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit d9fed9f
committed
Auto merge of rust-lang#116042 - Nadrieril:linear-pass-take-2, r=<try>
[Experiment] Rewrite exhaustiveness in one pass
Arm reachability checking does a quadratic amount of work: for each arm we check if it is reachable given the arms above it. This feels wasteful since we often end up re-exploring the same cases when we check for exhaustiveness.
This PR is an attempt to check reachability at the same time as exhaustiveness. This opens the door to a bunch of code simplifications I'm very excited about. The main question is whether I can get actual performance gains out of this.
I had started the experiment in rust-lang#111720 but I can't reopen it.
r? `@ghost`File tree
2 files changed
+569
-231
lines changed- compiler/rustc_mir_build/src/thir/pattern
2 files changed
+569
-231
lines changed
0 commit comments