You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Identify when a stmt could have been parsed as an expr
There are some expressions that can be parsed as a statement without
a trailing semicolon depending on the context, which can lead to
confusing errors due to the same looking code being accepted in some
places and not others. Identify these cases and suggest enclosing in
parenthesis making the parse non-ambiguous without changing the
accepted grammar.
Fixrust-lang#54186, cc rust-lang#54482, fixrust-lang#59975, fixrust-lang#47287.
The following program surprisingly does not compile:
The error is rather confusing, somehow it expects something to be
()
:If I remove either of the pair of braces in the last line, it works as expected.
The text was updated successfully, but these errors were encountered: