Split Single
ctor into more specific variants
This commit is contained in:
parent
4d1bd0db7f
commit
b111b2e839
4 changed files with 80 additions and 52 deletions
|
@ -874,7 +874,7 @@ fn pat_is_catchall(pat: &DeconstructedPat<'_, '_>) -> bool {
|
|||
use Constructor::*;
|
||||
match pat.ctor() {
|
||||
Wildcard => true,
|
||||
Single => pat.iter_fields().all(|pat| pat_is_catchall(pat)),
|
||||
Struct | Ref => pat.iter_fields().all(|pat| pat_is_catchall(pat)),
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue