Skip to content

Commit 62c1a64

Browse files
committed
small logic simplification
1 parent 7d77c85 commit 62c1a64

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,6 @@ impl ConstructorSet {
989989
}
990990
}
991991
}
992-
let seen_any_non_wildcard = !(split.is_empty() && seen.is_empty());
993992
match self {
994993
ConstructorSet::Single => {
995994
if seen.is_empty() {
@@ -1074,7 +1073,7 @@ impl ConstructorSet {
10741073
}
10751074
if !missing.is_empty() {
10761075
let report_when_all_missing = is_top_level && !matches!(self, Self::Integers { .. });
1077-
if seen_any_non_wildcard || report_when_all_missing {
1076+
if !split.is_empty() || report_when_all_missing {
10781077
split.push(Missing);
10791078
} else {
10801079
split.push(Wildcard);

0 commit comments

Comments
 (0)