Skip to content

Commit

Permalink
Auto merge of #128034 - Nadrieril:explain-unreachable, r=compiler-errors
Browse files Browse the repository at this point in the history
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 rust-lang/rust#127870. This is also the other one of the two diagnostic improvements I wanted to do before rust-lang/rust#122792.

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

r? `@compiler-errors`
  • Loading branch information
bors committed Jul 26, 2024
2 parents 816f7b3 + ed3d343 commit 2c3b70d
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 2c3b70d

Please sign in to comment.