summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-28971.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-28971.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-28971.rs b/src/test/ui/issues/issue-28971.rs
new file mode 100644
index 000000000..f0a1e2d00
--- /dev/null
+++ b/src/test/ui/issues/issue-28971.rs
@@ -0,0 +1,16 @@
+enum Foo {
+ Bar(u8)
+}
+fn main(){
+ foo(|| {
+ match Foo::Bar(1) {
+ Foo::Baz(..) => (),
+ //~^ ERROR no variant or associated item named `Baz` found
+ _ => (),
+ }
+ });
+}
+
+fn foo<F>(f: F) where F: FnMut() {
+ f();
+}