summaryrefslogtreecommitdiffstats
path: root/tests/ui/parser/fn-field-parse-error-ice.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/fn-field-parse-error-ice.rs')
-rw-r--r--tests/ui/parser/fn-field-parse-error-ice.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/parser/fn-field-parse-error-ice.rs b/tests/ui/parser/fn-field-parse-error-ice.rs
new file mode 100644
index 000000000..188257ea5
--- /dev/null
+++ b/tests/ui/parser/fn-field-parse-error-ice.rs
@@ -0,0 +1,10 @@
+// Regression test for #85794
+
+struct Baz {
+ inner : dyn fn ()
+ //~^ ERROR expected `,`, or `}`, found keyword `fn`
+ //~| ERROR expected identifier, found keyword `fn`
+ //~| ERROR cannot find type `dyn` in this scope
+}
+
+fn main() {}