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:
@@ -953,7 +953,7 @@ impl Parser {
|
||||
_ => {
|
||||
p.fatal(
|
||||
fmt!(
|
||||
"expected `;` or `}` but found `%s`",
|
||||
"expected `;` or `{` but found `%s`",
|
||||
self.this_token_to_str()
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user