summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/match_wildcard_for_single_variants.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/ui/match_wildcard_for_single_variants.fixed')
-rw-r--r--src/tools/clippy/tests/ui/match_wildcard_for_single_variants.fixed22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/match_wildcard_for_single_variants.fixed b/src/tools/clippy/tests/ui/match_wildcard_for_single_variants.fixed
index e675c183e..fc252cdd3 100644
--- a/src/tools/clippy/tests/ui/match_wildcard_for_single_variants.fixed
+++ b/src/tools/clippy/tests/ui/match_wildcard_for_single_variants.fixed
@@ -132,3 +132,25 @@ fn main() {
}
}
}
+
+mod issue9993 {
+ enum Foo {
+ A(bool),
+ B,
+ }
+
+ fn test() {
+ let _ = match Foo::A(true) {
+ _ if false => 0,
+ Foo::A(true) => 1,
+ Foo::A(false) => 2,
+ Foo::B => 3,
+ };
+
+ let _ = match Foo::B {
+ _ if false => 0,
+ Foo::A(_) => 1,
+ Foo::B => 2,
+ };
+ }
+}