fix a ui test

This commit is contained in:
Takayuki Maeda 2022-09-28 11:42:52 +09:00
parent d7b6bd8f13
commit e665d20c02
2 changed files with 5 additions and 3 deletions

View file

@ -1,5 +1,5 @@
fn main() {}
struct S {
fn //~ ERROR expected identifier, found keyword `fn`
fn: u8 //~ ERROR expected identifier, found keyword `fn`
}

View file

@ -1,12 +1,14 @@
error: expected identifier, found keyword `fn`
--> $DIR/incomplete-fn-in-struct-definition.rs:4:5
|
LL | fn
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
LL | r#fn: u8
| ++
error: aborting due to previous error