Confusing error when forgetting a semicolon before an array #99658
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
playground
Given the following code:
The current output is:
This is very confusing unless you notice the missing semicolon. The error message should mention that
foo()[1, 2]
is interpreted as an indexing expression, with something like "error when parsing index expression".The text was updated successfully, but these errors were encountered: