-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
RawString error reporting cleanup #72884
Merged
bors
merged 2 commits into
rust-lang:master
from
Julian-Wollersberger:raw_str_error_cleanup
Jun 2, 2020
Merged
RawString error reporting cleanup #72884
bors
merged 2 commits into
rust-lang:master
from
Julian-Wollersberger:raw_str_error_cleanup
Jun 2, 2020
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
(rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Jun 1, 2020
r? @petrochenkov |
This comment has been minimized.
This comment has been minimized.
petrochenkov
reviewed
Jun 1, 2020
petrochenkov
added
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jun 1, 2020
Julian-Wollersberger
force-pushed
the
raw_str_error_cleanup
branch
2 times, most recently
from
June 1, 2020 19:54
5309fbe
to
725d2cd
Compare
This makes `UnvalidatedRawStr` and `ValidatedRawStr` unnecessary and removes 70 lines.
… remove an outdated FIXME.
Julian-Wollersberger
force-pushed
the
raw_str_error_cleanup
branch
from
June 1, 2020 20:02
725d2cd
to
7be8077
Compare
@bors r+ |
📌 Commit 7be8077 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Jun 2, 2020
Thanks for reviewing ^^ |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 2, 2020
Rollup of 4 pull requests Successful merges: - rust-lang#72884 (RawString error reporting cleanup ) - rust-lang#72888 (Add a warning about infinite reading in read_(until|line)) - rust-lang#72914 (Minor: off-by-one error in RELEASES.md) - rust-lang#72916 (Update README.md) Failed merges: r? @ghost
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
I simplified how errors with raw string are represented in the lexer and reportet in the parser, by using one enum instead of two structs with impls. This makes 70 code lines obsolete.
I also noticed some other things (2nd commit) and added a missing test for the `too many '#' symbols' error.
My original intent was to improve performance, but the only thing I found was to inline some functions in
cursor.rs
. It's effect is barely measurable, though.There is one open question. Before, the compiler aborts when encountering the
too many '#' symbols
error. Now the lexer says in this case that there are 0 hashes, and then later the parser aborts on the error.I'm worrying that the parser may be changed to recover and continue, and then later stages will see the wrong numer of hashes and act strange. (eg. the
format!
macro expansion).Is that possibility important enough today to worry about it?