2022-09-27 03:20:55 -05:00
|
|
|
error: expected identifier, found keyword `fn`
|
|
|
|
--> $DIR/incomplete-fn-in-struct-definition.rs:4:5
|
|
|
|
|
|
2022-09-27 21:42:52 -05:00
|
|
|
LL | struct S {
|
|
|
|
| - while parsing this struct
|
|
|
|
LL | fn: u8
|
2022-09-27 03:20:55 -05:00
|
|
|
| ^^ expected identifier, found keyword
|
|
|
|
|
|
|
|
|
help: escape `fn` to use it as an identifier
|
|
|
|
|
|
2022-09-27 21:42:52 -05:00
|
|
|
LL | r#fn: u8
|
2022-09-27 03:20:55 -05:00
|
|
|
| ++
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|