summaryrefslogtreecommitdiffstats
path: root/src/test/ui/match/match-wildcards.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/match/match-wildcards.rs')
-rw-r--r--src/test/ui/match/match-wildcards.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/match/match-wildcards.rs b/src/test/ui/match/match-wildcards.rs
new file mode 100644
index 000000000..43f6e4913
--- /dev/null
+++ b/src/test/ui/match/match-wildcards.rs
@@ -0,0 +1,21 @@
+// run-fail
+// error-pattern:squirrelcupcake
+// ignore-emscripten no processes
+
+fn cmp() -> isize {
+ match (Some('a'), None::<char>) {
+ (Some(_), _) => {
+ panic!("squirrelcupcake");
+ }
+ (_, Some(_)) => {
+ panic!();
+ }
+ _ => {
+ panic!("wat");
+ }
+ }
+}
+
+fn main() {
+ println!("{}", cmp());
+}