Michael Howell
fd35770e8d
diagnostic: suggest parens when users want logical ops, but get closures
2022-02-24 17:02:38 -07:00
Jubilee
08cbb7dbe1
Rollup merge of #88757 - andrewhickman:master, r=jackh726
...
Suggest wapping expr in parentheses on invalid unary negation
Fixes #88701
2021-09-11 08:23:42 -07:00
Andrew Hickman
d6ce3269b4
Suggest wapping expr in parentheses on invalid unary negation
...
Fixes #88701
2021-09-06 23:34:47 +01:00
Theodore Luo Wang
65eb7e516c
Use verbose suggestions and only match if the + is seen before a numeric literal
2021-09-04 22:35:59 -04:00
Theodore Luo Wang
5a863d594c
Add checks for a block before a unary plus. Fix failing tests
2021-09-01 11:54:06 -04:00
Eric Huss
2817be94cc
Update rustfix for compiletest.
2021-06-20 16:35:14 -07:00
Esteban Küber
9b5a974bd5
Correctly parse {} && false in tail expression
...
Fix #74233 .
2020-07-22 12:01:56 -07:00
Esteban Küber
617ce2b7ee
Reword ambigous parse error to fit with the current error
2019-04-30 20:37:42 -07:00
Esteban Küber
bff0be3784
Add test case for #47287
2019-04-29 14:35:09 -07:00
Esteban Küber
f007e6f442
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.
2019-04-29 14:07:02 -07:00