diff options
Diffstat (limited to 'tests/ui/structs/incomplete-fn-in-struct-definition.stderr')
-rw-r--r-- | tests/ui/structs/incomplete-fn-in-struct-definition.stderr | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/structs/incomplete-fn-in-struct-definition.stderr b/tests/ui/structs/incomplete-fn-in-struct-definition.stderr new file mode 100644 index 000000000..0d12ba9c9 --- /dev/null +++ b/tests/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 + |