summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/match-non-exhaustive.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pattern/usefulness/match-non-exhaustive.rs')
-rw-r--r--tests/ui/pattern/usefulness/match-non-exhaustive.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/pattern/usefulness/match-non-exhaustive.rs b/tests/ui/pattern/usefulness/match-non-exhaustive.rs
new file mode 100644
index 000000000..3b210a115
--- /dev/null
+++ b/tests/ui/pattern/usefulness/match-non-exhaustive.rs
@@ -0,0 +1,4 @@
+fn main() {
+ match 0 { 1 => () } //~ ERROR non-exhaustive patterns
+ match 0 { 0 if false => () } //~ ERROR non-exhaustive patterns
+}