rust/tests/ui/rfcs/rfc-2008-non-exhaustive
bors ee80c8d0a8 Auto merge of #117611 - Nadrieril:linear-pass-take-4, r=cjgillot
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 https://github.com/rust-lang/rust/issues/79307
2023-11-26 00:14:14 +00:00
..
auxiliary Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
improper_ctypes Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
uninhabited Show number in error message even for one error 2023-11-24 19:15:52 +01:00
borrowck-exhaustive.rs Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
borrowck-non-exhaustive.rs Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
borrowck-non-exhaustive.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
enum-as-cast.rs Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
enum-as-cast.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
enum.rs Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
enum.stderr Improve clarity of diagnostic message on non-exhaustive matches 2023-09-03 19:55:11 +08:00
enum_same_crate.rs Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
enum_same_crate_empty_match.rs Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
enum_same_crate_empty_match.stderr Tweak spans for "adt defined here" note 2023-11-03 18:26:16 +01:00
invalid-attribute.rs Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
invalid-attribute.stderr Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
omitted-patterns-dont-lint-on-arm.lint.stderr Suggest to set lint level on whole match 2023-11-04 14:44:00 +01:00
omitted-patterns-dont-lint-on-arm.normal.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
omitted-patterns-dont-lint-on-arm.rs Suggest to set lint level on whole match 2023-11-04 14:44:00 +01:00
omitted-patterns.rs Add some tests 2023-11-22 02:14:42 +01:00
omitted-patterns.stderr Add some tests 2023-11-22 02:14:42 +01:00
stable-omitted-patterns.rs Lint `non_exhaustive_omitted_patterns` per column 2023-10-14 19:39:18 +02:00
stable-omitted-patterns.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
struct.rs Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
struct.stderr Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
structs_same_crate.rs Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
variant.rs Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
variant.stderr Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
variants_fictive_visibility.rs Better group RFC ui tests together 2023-06-05 16:09:46 +00:00
variants_same_crate.rs Better group RFC ui tests together 2023-06-05 16:09:46 +00:00