summaryrefslogtreecommitdiffstats
path: root/src/test/ui/structs/incomplete-fn-in-struct-definition.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/structs/incomplete-fn-in-struct-definition.stderr')
-rw-r--r--src/test/ui/structs/incomplete-fn-in-struct-definition.stderr15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/structs/incomplete-fn-in-struct-definition.stderr b/src/test/ui/structs/incomplete-fn-in-struct-definition.stderr
new file mode 100644
index 000000000..0d12ba9c9
--- /dev/null
+++ b/src/test/ui/structs/incomplete-fn-in-struct-definition.stderr
@@ -0,0 +1,15 @@
+error: expected identifier, found keyword `fn`
+ --> $DIR/incomplete-fn-in-struct-definition.rs:4:5
+ |
+LL | struct S {
+ | - while parsing this struct
+LL | fn: u8
+ | ^^ expected identifier, found keyword
+ |
+help: escape `fn` to use it as an identifier
+ |
+LL | r#fn: u8
+ | ++
+
+error: aborting due to previous error
+