mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
41e8d152dc
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
16 lines
351 B
Plaintext
16 lines
351 B
Plaintext
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 1 previous error
|
|
|