Fix condition for "missing struct
" diagnostic on tuple structs
The check previously matched this, and suggested adding a missing `struct`: pub Foo(...): It was probably intended to match this instead (semicolon instead of colon): pub Foo(...);
This commit is contained in:
parent
a84adba552
commit
0757d5f83f
8 changed files with 42 additions and 7 deletions
|
@ -412,7 +412,7 @@ impl<'a> Parser<'a> {
|
|||
} else if self.check(&token::OpenDelim(Delimiter::Brace)) {
|
||||
self.bump(); // `{`
|
||||
("fn", kw_name, false)
|
||||
} else if self.check(&token::Colon) {
|
||||
} else if self.check(&token::Semi) {
|
||||
let kw = "struct";
|
||||
(kw, kw, false)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue