1
Fork 0

Auto merge of #119610 - Nadrieril:never_pattern_bindings, r=compiler-errors

never patterns: Check bindings wrt never patterns

Never patterns:
- Shouldn't contain bindings since they never match anything;
- Don't count when checking that or-patterns have consistent bindings.

r? `@compiler-errors`
This commit is contained in:
bors 2024-01-15 21:24:13 +00:00
commit 714b29a17f
13 changed files with 243 additions and 130 deletions

View file

@ -265,6 +265,8 @@ enum ResolutionError<'a> {
InvalidAsmSym,
/// `self` used instead of `Self` in a generic parameter
LowercaseSelf,
/// A never pattern has a binding.
BindingInNeverPattern,
}
enum VisResolutionError<'a> {