Skip to content

Commit

Permalink
Auto merge of #117611 - Nadrieril:linear-pass-take-4, r=cjgillot
Browse files Browse the repository at this point in the history
Rewrite exhaustiveness in one pass

This is at least my 4th attempt at this in as many years x) Previous attempts were all too complicated or too slow. But we're finally here!

The previous version of the exhaustiveness algorithm computed reachability for each arm then exhaustiveness of the whole match. Since each of these steps does roughly the same things, this rewrites the algorithm to do them all in one go. I also think this makes things much simpler.

I also rewrote the documentation of the algorithm in depth. Hopefully it's up-to-date and easier to follow now. Plz comment if anything's unclear.

r? `@oli-obk` I think you're one of the rare other people to understand the exhaustiveness algorithm?

cc `@varkor` I know you're not active anymore, but if you feel like having a look you might enjoy this :D

Fixes rust-lang/rust#79307
  • Loading branch information
bors committed Nov 26, 2023
2 parents 77a9dfe + b1f0132 commit 0b1e434
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 0b1e434

Please sign in to comment.