summaryrefslogtreecommitdiffstats
path: root/src/test/ui/match/match-fn-call.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/match/match-fn-call.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/match/match-fn-call.rs b/src/test/ui/match/match-fn-call.rs
new file mode 100644
index 000000000..99092602c
--- /dev/null
+++ b/src/test/ui/match/match-fn-call.rs
@@ -0,0 +1,12 @@
+use std::path::Path;
+
+fn main() {
+ let path = Path::new("foo");
+ match path {
+ Path::new("foo") => println!("foo"),
+ //~^ ERROR expected tuple struct or tuple variant
+ Path::new("bar") => println!("bar"),
+ //~^ ERROR expected tuple struct or tuple variant
+ _ => (),
+ }
+}