rust/compiler/rustc_mir_build/src
bors 355efacf0d Auto merge of #128034 - Nadrieril:explain-unreachable, r=compiler-errors
exhaustiveness: Explain why a given pattern is considered unreachable

This PR tells the user why a given pattern is considered unreachable. I reused the intersection information we were already computing; even though it's incomplete I convinced myself that it is sufficient to always get a set of patterns that cover the unreachable one.

I'm not a fan of the diagnostic messages I came up with, I'm open to suggestions.

Fixes https://github.com/rust-lang/rust/issues/127870. This is also the other one of the two diagnostic improvements I wanted to do before https://github.com/rust-lang/rust/pull/122792.

Note: the first commit is an unrelated drive-by tweak.

r? `@compiler-errors`
2024-07-26 10:51:04 +00:00
..
build Remove an obsolete comment 2024-07-25 16:41:51 +10:00
thir Auto merge of #128034 - Nadrieril:explain-unreachable, r=compiler-errors 2024-07-26 10:51:04 +00:00
check_unsafety.rs Rollup merge of #125834 - workingjubilee:weaken-thir-unsafeck-for-addr-of-static-mut, r=compiler-errors 2024-07-23 13:06:54 +02:00
errors.rs Improve "covered_by_many" error 2024-07-24 08:46:52 +02:00
lib.rs Use tidy to sort crate attributes for all compiler crates. 2024-06-12 15:49:10 +10:00
lints.rs Fix unconditional recursion lint wrt tail calls 2024-07-07 17:11:05 +02:00