-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad parse error on token sequences safe unsafe
and unsafe safe
#134580
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
safe unsafe
and unsafe safe
(before free (extern) fns and in extern blocks)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
safe unsafe
and unsafe safe
(before free (extern) fns and in extern blocks)safe unsafe
and unsafe safe
@ionicmc-rs: This is just a diagnostic issue. As alluded to in the PR that attempted to fix a subset of this issue, this requires some delicate treatment around contextual/"soft" keywords because a bad implementation is likely to regress legitimate code if it's not aware of the grammatical implications of the recovery path. Thanks for raising this issue, but it's also not going to get the issue fixed faster by trying to push on things. |
Ok sorry for my mistake |
Ok so it seems the issue is just with |
I'm going to address this at some point when I'm back from vacations and if nobody beats me. |
I specifically mean that the recovery paths seems a bit wonky, because where the
I don't think we have specific contextual keywords infra because... (see below)
@spastorino I briefly looked at it, it seems like the contextual keyword handling is indeed quite scattered, because "contextual" obviously depends on... context. For |
Code
Current output
Desired output
Rationale and extra context
look at the errors for #2 and #3:
this means that it thinks that the order is incorrect
which is likely because they are both included in the check for order
Other cases
Output:
Rust Version
Anything else?
This is a follow up to #133586 and #133631
#133586 has the PR #133618
(all of the above are closed)
The text was updated successfully, but these errors were encountered: