summaryrefslogtreecommitdiffstats
path: root/src/test/ui/pattern/usefulness/issue-56379.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/pattern/usefulness/issue-56379.rs')
-rw-r--r--src/test/ui/pattern/usefulness/issue-56379.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/pattern/usefulness/issue-56379.rs b/src/test/ui/pattern/usefulness/issue-56379.rs
new file mode 100644
index 000000000..9bccccca9
--- /dev/null
+++ b/src/test/ui/pattern/usefulness/issue-56379.rs
@@ -0,0 +1,14 @@
+enum Foo {
+ A(bool),
+ B(bool),
+ C(bool),
+}
+
+fn main() {
+ match Foo::A(true) {
+ //~^ ERROR non-exhaustive patterns: `A(false)`, `B(false)` and `C(false)` not covered
+ Foo::A(true) => {}
+ Foo::B(true) => {}
+ Foo::C(true) => {}
+ }
+}