Fix error message when trait method ends with wrong token
When parsing a trait function, the function must end with either `;` or
`{` (signifying a default implementation). The error message incorrectly
stated that it must be `;` or `}`.
Fixes #6610.
This commit is contained in:
parent
fc3297ff05
commit
1fcb7ed9a6
2 changed files with 14 additions and 1 deletions
|
|
@ -953,7 +953,7 @@ impl Parser {
|
|||
_ => {
|
||||
p.fatal(
|
||||
fmt!(
|
||||
"expected `;` or `}` but found `%s`",
|
||||
"expected `;` or `{` but found `%s`",
|
||||
self.this_token_to_str()
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue