diff options
Diffstat (limited to 'tests/ui/match/match-fn-call.rs')
-rw-r--r-- | tests/ui/match/match-fn-call.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/match/match-fn-call.rs b/tests/ui/match/match-fn-call.rs new file mode 100644 index 000000000..99092602c --- /dev/null +++ b/tests/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 + _ => (), + } +} |