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
GRAM: parse ::
as an incomplete path
#6541
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vlad20012
force-pushed
the
gram-parse-colon-colon-as-incomplete-path
branch
from
December 22, 2020 12:57
076e7cc
to
eae6e54
Compare
vlad20012
force-pushed
the
gram-parse-colon-colon-as-incomplete-path
branch
from
December 23, 2020 11:53
eae6e54
to
0ba99cd
Compare
bors r+ The regression tests failure is OK because there is a replacement of one syntax error with another |
Build succeeded: |
bors bot
added a commit
that referenced
this pull request
Dec 23, 2020
6542: GRAM: simplify syntax error messages on incorrect paths r=vlad20012 a=vlad20012 In addition to #6541 let's show `identifier expected, got ';'` message instead of `Self, crate, identifier, self or super expected, got ';'`. This is a bit closer to `rustc`'s messages #### Before: ![image](https://user-images.githubusercontent.com/3221931/102892159-872f9300-4470-11eb-86f1-f5bae745f39d.png) #### After: ![image](https://user-images.githubusercontent.com/3221931/102892340-c78f1100-4470-11eb-9bbe-1c36fd47a297.png) #### Rustc: ![image](https://user-images.githubusercontent.com/3221931/102892218-99113600-4470-11eb-964c-9ffc29c34e10.png) changelog: Improve syntax error messages in the case of incomplete paths Co-authored-by: vlad20012 <beskvlad@gmail.com>
bors bot
added a commit
that referenced
this pull request
Dec 23, 2020
6542: GRAM: simplify syntax error messages on incorrect paths r=vlad20012 a=vlad20012 In addition to #6541 let's show `identifier expected, got ';'` message instead of `Self, crate, identifier, self or super expected, got ';'`. This is a bit closer to `rustc`'s messages #### Before: ![image](https://user-images.githubusercontent.com/3221931/102892159-872f9300-4470-11eb-86f1-f5bae745f39d.png) #### After: ![image](https://user-images.githubusercontent.com/3221931/102892340-c78f1100-4470-11eb-9bbe-1c36fd47a297.png) #### Rustc: ![image](https://user-images.githubusercontent.com/3221931/102892218-99113600-4470-11eb-964c-9ffc29c34e10.png) changelog: Improve syntax error messages in the case of incomplete paths Co-authored-by: vlad20012 <beskvlad@gmail.com>
bors bot
added a commit
that referenced
this pull request
Dec 23, 2020
6542: GRAM: simplify syntax error messages on incorrect paths r=vlad20012 a=vlad20012 In addition to #6541 let's show `identifier expected, got ';'` message instead of `Self, crate, identifier, self or super expected, got ';'`. This is a bit closer to `rustc`'s messages #### Before: ![image](https://user-images.githubusercontent.com/3221931/102892159-872f9300-4470-11eb-86f1-f5bae745f39d.png) #### After: ![image](https://user-images.githubusercontent.com/3221931/102892340-c78f1100-4470-11eb-9bbe-1c36fd47a297.png) #### Rustc: ![image](https://user-images.githubusercontent.com/3221931/102892218-99113600-4470-11eb-964c-9ffc29c34e10.png) changelog: Improve syntax error messages in the case of incomplete paths Co-authored-by: vlad20012 <beskvlad@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #6404 (comment). Can be considered as a continuation of #6285.
Provides better syntax error messages in the case of an incomplete path like this:
c.c. @msmorgan
changelog: Improve parser recovery and syntax error messages in the case of incomplete paths