fix a ui test
This commit is contained in:
parent
d7b6bd8f13
commit
e665d20c02
2 changed files with 5 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
fn main() {}
|
||||
|
||||
struct S {
|
||||
fn //~ ERROR expected identifier, found keyword `fn`
|
||||
fn: u8 //~ ERROR expected identifier, found keyword `fn`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue