summaryrefslogtreecommitdiffstats
path: root/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.rs')
-rw-r--r--tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.rs b/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.rs
new file mode 100644
index 000000000..17dc38ab2
--- /dev/null
+++ b/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.rs
@@ -0,0 +1,6 @@
+fn main() {
+ let f = |3: isize| println!("hello");
+ //~^ ERROR refutable pattern in function argument
+ //~| `_` not covered
+ f(4);
+}